[PECOBLR-675] support for session params#307
Merged
samikshya-db merged 1 commit intodatabricks:mainfrom Aug 22, 2025
Merged
Conversation
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
samikshya-db
approved these changes
Aug 22, 2025
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.
Description
This PR adds support for passing session parameters during session creation in the Node.js SQL Driver. Previously, there was no direct API to forward session configuration during
openSession. With this change, callers can provide aconfigurationmap (e.g.,QUERY_TAGS,ansi_mode) that is forwarded to ThriftTOpenSessionReq.configuration. This change allows users to pass query tags as well, which allow users to attach key-value pairs to SQL executions that appear in thesystem.query.historytable.Changes Made
API (
lib/contracts/IDBSQLClient.ts)configuration?: { [key: string]: string }toOpenSessionRequest.Implementation (
lib/DBSQLClient.ts)openSession()now forwardsrequest.configurationto Thrift viaTOpenSessionReq.configurationExample (
examples/session_params.js)QUERY_TAGS,ansi_modeetc.) viaopenSession({ configuration }).Query Tags usage example
How is this tested?
Testing Details
configurationis forwarded toTOpenSessionReq.configuration. Ran the remaining unit suite; all passing.QUERY_TAGSinopenSession({ configuration })examples/session_params.jsagainst a real backend; returned expected result.