DataConnectors icon indicating copy to clipboard operation
DataConnectors copied to clipboard

ODBC DirectQuery Folding With More Expressions

Open superdupershant opened this issue 3 years ago • 4 comments

Created a new directquery connector based on ODBC.Datasource but pretty disappointed in the limited number of expressions that get pushed down. For example I'd love it if Text.StartsWith() could be pushed down.

How is the list of expressions determined? Does the ODBC GetSqlInfo API factor into this at all? In the case of our connector SQLGetInfo(SQL_STRING_FUNCTIONS) via ODBC would indicate that the LOCATE() function is supported.

Below is the list of expressions returned from DirectQueryCapabilities.From() for our DataSource. Is there a way to extend this list programmatically? If we could indicate more expressions to fold how would M know which corresponding SQL expression to use?

Core	null
LiteralCount	2100
Table.FirstN	null
Table.Sort	null
Table.RowCount	null
List.Average	null
List.Max	null
List.Min	null
List.Sum	null
Text.Start	null
Text.TrimStart	null
Text.Length	null
Text.Lower	null
Text.PositionOf	null
Text.End	null
Text.TrimEnd	null
Text.Middle	null
Text.Upper	null
Number.Abs	null
Number.Acos	null
Number.Asin	null
Number.Atan	null
Number.Atan2	null
Number.RoundUp	null
Number.Cos	null
Number.Exp	null
Number.RoundDown	null
Number.Log	null
Number.Sign	null
Number.Sin	null
Number.Sqrt	null
Number.Tan	null
Number.Log10	null
Number.Power	null
Number.Round	null
Date.Year	null
Date.Month	null
Date.QuarterOfYear	null
Date.DayOfYear	null
Date.Day	null
Time.Hour	null
Time.Minute	null
Date.StartOfYear	null
Date.StartOfMonth	null
Date.StartOfQuarter	null
Date.StartOfWeek	null
Date.StartOfDay	null
Time.StartOfHour	null
Time.StartOfMinute	null
Date.AddYears	null
Date.AddMonths	null
Date.AddQuarters	null
Date.AddWeeks	null
Date.AddDays	null
Duration.TotalDays	null
Duration.TotalHours	null
Duration.TotalMinutes	null
Duration.TotalSeconds	null
Duration.From	null

superdupershant avatar Feb 18 '21 03:02 superdupershant