Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Statement level query tag in NodeJS connector#366

Merged
jiabin-hu merged 7 commits into
maindatabricks/databricks-sql-nodejs:mainfrom
jiabin-hu/query-tagsdatabricks/databricks-sql-nodejs:jiabin-hu/query-tagsCopy head branch name to clipboard
May 3, 2026
Merged

Statement level query tag in NodeJS connector#366
jiabin-hu merged 7 commits into
maindatabricks/databricks-sql-nodejs:mainfrom
jiabin-hu/query-tagsdatabricks/databricks-sql-nodejs:jiabin-hu/query-tagsCopy head branch name to clipboard

Conversation

@jiabin-hu
Copy link
Copy Markdown
Collaborator

Summary

  • Adds queryTags option to ExecuteStatementOptions for per-statement query tagging
  • Implements serializeQueryTags() utility that converts a key/value dict to a comma-separated key:value string (matching the Python connector's format), with backslash-escaping for special characters in values
  • Serialized tags are passed via confOverlay["query_tags"] on TExecuteStatementReq, consistent with the Python connector
    implementation

This PR replaces #339

Test plan

  • Unit tests for serializeQueryTags covering null/empty input, basic serialization, null values, and special character escaping (tests/unit/utils/queryTags.test.ts)
  • Unit tests for executeStatement verifying confOverlay.query_tags is set/unset correctly (tests/unit/DBSQLSession.test.ts)
  • Run npm test to confirm all unit tests pass

Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Co-authored-by: Isaac
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

- Use dot notation for QUERY_TAGS configuration access
- Convert serializeQueryTags to default export

Co-authored-by: Isaac
Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 3, 2026

Thanks for your contribution! To satisfy the DCO policy in our contributing guide every commit message must include a sign-off message. One or more of your commits is missing this message. You can reword previous commit messages with an interactive rebase (git rebase -i main).

Signed-off-by: Jiabin Hu <jiabin.hu@databricks.com>
@jiabin-hu jiabin-hu force-pushed the jiabin-hu/query-tags branch from 95807fb to 9936f37 Compare May 3, 2026 04:27
@jiabin-hu jiabin-hu merged commit c667602 into main May 3, 2026
8 checks passed
@vikrantpuppala vikrantpuppala mentioned this pull request May 7, 2026
4 tasks
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.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.