feat(csharp/src/Drivers/Apache/Spark): add user agent entry + thrift version for spark http connections#2711
Merged
Conversation
Contributor
|
Let's also try to add ThriftClient information to userAgent, e.g. https://src.dev.databricks.com/databricks/databricks-jdbc@ee2828dced23bd42c65ba5658b2b266891dbef6a/-/blob/src/main/java/com/databricks/jdbc/api/impl/DatabricksConnectionContext.java?L320 |
35dc2a4 to
0f70d05
Compare
9c6119b to
b1bb50d
Compare
CurtHagenlocher
requested changes
Apr 22, 2025
Contributor
CurtHagenlocher
left a comment
There was a problem hiding this comment.
Thanks! Can you mollify the linter by adding a final newline to the added test file and removing the trailing spaces from the others?
| string userAgent = GetUserAgentFromConnection(properties); | ||
|
|
||
| // Assert | ||
| Assert.Matches(@"ADBCSparkDriver/[\d\.]+ Thrift(/[\d\.]+)?", userAgent); |
Contributor
There was a problem hiding this comment.
There are also trailing spaces somewhere around here.
Contributor
Author
There was a problem hiding this comment.
I think they're fixed now? Thanks for giving me the headsup
4b658df to
e846be3
Compare
colin-rogers-dbt
pushed a commit
to dbt-labs/arrow-adbc
that referenced
this pull request
Jun 10, 2025
…version for spark http connections (apache#2711) Enables user agent entry to be passed via SparkParameters, such as "user_agent_entry = PowerBi". Also adds Thrift version to user agent header Verified in Databricks HTTP Logs for the user agent: ADBCSparkDriver/1.0.0 Thrift/0.21.0 PowerBI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables user agent entry to be passed via SparkParameters, such as "user_agent_entry = PowerBi".
Also adds Thrift version to user agent header
Verified in Databricks HTTP Logs for the user agent:
ADBCSparkDriver/1.0.0 Thrift/0.21.0 PowerBI