-
Notifications
You must be signed in to change notification settings - Fork 114
feat(csharp/src/Drivers/Databricks): Support server side property passthrough #2692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(csharp/src/Drivers/Databricks): Support server side property passthrough #2692
Conversation
Is there some type of test that can be included to demonstrate this is working correctly? |
foreach (var property in serverSideProperties) | ||
{ | ||
req.Configuration[property.Key] = property.Value; | ||
} |
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.
I wonder what kind of logs we can add here. @davidhcoe Until the logging/telemetry framework is ready do you recommend we log anything?
I added an E2E test for this |
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.
Thanks! Out of curiosity, would we still need this feature if it were possible to reliably execute multiple statements in a single batch?
I don't know how to judge the need for escaping and/or the risk of SQL injection. One risk here is that even if injection is not possible today due to (perhaps) the semantics of SET and/or SparkSQL in general, those semantics might change in the future.
c0b83ce
to
a79a326
Compare
Yes, because we still need the ability to set server side properties through Thrift. In Power BI with ODBC driver, we actually set ApplySSPWithQueries to false by default because it's more efficient. Applying SSP with "SET" queries should only be used when there is a Thrift protocol mismatch, where setting options through Thrift configuration is 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.
Thanks!
We want to be able to pass server side properties through the driver, e.g. use_cached_result.
In ODBC driver, the behavior is like this:
This PR adds support in the ADBC driver for this
Tested E2E by setting
which disabled result cache for the executed query.
When using

{ "adbc.databricks.apply_ssp_with_queries", "true" }
, I see a set query in the query history