Skip to content
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

renamed clientId to userAgentHeader in connect args #281

Merged
merged 3 commits into from
Feb 20, 2025

Conversation

shivam2680
Copy link
Contributor

@shivam2680 shivam2680 commented Feb 18, 2025

Description

This PR adds userAgentHeader option in connect call, so users can configure the user agent string generated.
Note: clientId arg in connect options is renamed to userAgentHeader. The clientId in OAuthManager options exists and corresponds to the Databricks Service Principal clientId.

Testing

unit tests

@@ -30,7 +30,7 @@ export type ConnectionOptions = {
host: string;
port?: number;
path: string;
clientId?: string;
userAgentHeader?: string;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The only thing I'd change - maybe use userAgentEntry, like in Python connector

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

// Example:
// - NodejsDatabricksSqlConnector/0.1.8-beta.1 (Node.js 16.13.1; Darwin 21.5.0)
// UserAgent ::= <ProductName> '/' <ProductVersion> '(' <Comment> ')'
// ProductName ::= 'NodejsDatabricksSqlConnector'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit : include the where in comment

@shivam2680 shivam2680 merged commit 538bf7a into main Feb 20, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants