Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

ODBC: Use literals instead of parameters in Power BI data connector #652

Merged

Conversation

rupal-bq
Copy link
Contributor

Issue #651:

Description of changes:

  • added support for literals instead of parameters
  • disabled direct query
  • updated user docs

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Rupal Mahajan added 30 commits July 18, 2020 21:01
- 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
LimitClauseKind = LimitClauseKind.LimitOffset,
SupportsNumericLiterals = true,
SupportsStringLiterals = true,
SupportsOdbcDateLiterals = true,
Copy link
Contributor

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

Copy link
Contributor Author

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.

Copy link
Contributor Author

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)

Copy link
Contributor

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

@dai-chen dai-chen added the ODBC label Aug 3, 2020
@chloe-zh chloe-zh merged commit b6760cc into opendistro-for-elasticsearch:develop Aug 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants