-
Notifications
You must be signed in to change notification settings - Fork 186
ODBC: Use literals instead of parameters in Power BI data connector #652
ODBC: Use literals instead of parameters in Power BI data connector #652
Conversation
- add docs
- add unit test - add errors - enable direct query
…e/odbc/pbi # Conflicts: # sql-odbc/.gitignore # sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.mproj # sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq # sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.query.pq # sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez
…e/odbc/pbi # Resolved Conflicts: # sql-odbc/src/PowerBIConnector/OdfeSqlOdbcPBIConnector.pq # sql-odbc/src/PowerBIConnector/bin/Release/OdfeSqlOdbcPBIConnector.mez
LimitClauseKind = LimitClauseKind.LimitOffset, | ||
SupportsNumericLiterals = true, | ||
SupportsStringLiterals = true, | ||
SupportsOdbcDateLiterals = true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you confirm these options for date/time/timestamp literals? Wondering if this refers to the {dt ...}
-type syntax we've seen before, which ODFE SQL plugin doesn't support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this refers to {d ..}
syntax. But if we don't set this to true then date values will always be specified using Parameter Binding (https://docs.microsoft.com/en-us/power-query/odbc) which is also not supported.
I will check if it is possible to report the escape sequence syntax unsupported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ODBC driver sets SQL_DATETIME_LITERALS
to 0 in SQLGetInfo and a value of "0" means that SQL-92 datetime literals are not supported. (https://docs.microsoft.com/en-us/sql/odbc/reference/syntax/sqlgetinfo-function?view=sql-server-ver15)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Verified with @rupal-bq that timestamp values work with the current PBI connector; will look back at this when we include DirectQuery support
Issue #651:
Description of changes:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.