NO-SNOW Propagate unrecognised driver parameters as session parameters#737
Merged
sfc-gh-pfus merged 1 commit intomainfrom Apr 1, 2026
Conversation
Collaborator
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enables drivers to pass arbitrary Snowflake session parameters by supplying unrecognized connection options, which sf_core forwards as session parameters during the login request. It also adds end-to-end coverage across the shared .feature definition and the Rust/Python/JDBC/ODBC driver test suites.
Changes:
- Add
sf_corelogic to collect unregistered connection settings and forward them as login-time session parameters. - Update the ODBC wrapper to forward previously-ignored unknown connection string keys into
sf_core. - Add cross-language E2E tests validating
QUERY_TAGforwarding behavior.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/definitions/shared/session/session_parameters.feature |
Adds shared behavioral definition for session-parameter forwarding via connection options. |
sf_core/tests/e2e/session/session_parameters.rs |
Adds Rust E2E test verifying QUERY_TAG is applied via unknown connection option. |
sf_core/tests/e2e/session/mod.rs |
Wires the new Rust E2E session test module. |
sf_core/src/config/param_store.rs |
Exposes an iterator over stored parameters for internal use. |
sf_core/src/apis/database_driver_v1/validation.rs |
Implements collect_unknown_settings + unit test to identify and forward unknown settings. |
sf_core/src/apis/database_driver_v1/connection.rs |
Merges unknown settings into init_session_parameters before login. |
python/tests/e2e/session/test_session_parameters.py |
Adds Python E2E test (skipped for reference driver) for unknown option forwarding. |
odbc_tests/tests/e2e/session/session_parameters.cpp |
Adds ODBC E2E test verifying QUERY_TAG forwarding via connection string. |
odbc_tests/tests/e2e/CMakeLists.txt |
Registers the new ODBC E2E test target. |
odbc/src/api/connection.rs |
Forwards unrecognized connection string keys to sf_core instead of ignoring them. |
jdbc/src/test/java/net/snowflake/jdbc/e2e/session/SessionParametersTests.java |
Adds JDBC E2E test verifying QUERY_TAG forwarding via connection properties. |
8841a75 to
d9f37ad
Compare
sfc-gh-boler
approved these changes
Mar 30, 2026
Collaborator
sfc-gh-boler
left a comment
There was a problem hiding this comment.
lgtm, but see the two commends from Copilot, which should be addressed.
d9f37ad to
171027a
Compare
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.

TL;DR
Added functionality to forward unrecognized connection options as session parameters during login, allowing drivers to set arbitrary Snowflake session parameters like
QUERY_TAGthrough connection strings.What changed?
sf_coreto collect unrecognized string-typed connection settings and forward them as session parameters during loginsf_coreinstead of logging warningscollect_unknown_settings()function to identify and collect unregistered connection optionsiter()method toParamStoreto enable iteration over stored settingsHow to test?
Run the new end-to-end tests across all drivers:
QUERY_TAG=session_param_e2e_testas a connection optionSELECT CURRENT_QUERY_TAG()"session_param_e2e_test"Tests are available for JDBC, ODBC, Python, and sf_core, along with a shared Gherkin feature definition.
Why make this change?
This enables drivers to support arbitrary Snowflake session parameters without requiring explicit implementation for each parameter. Users can now set session parameters like
QUERY_TAG,TIMEZONE, or any other Snowflake session parameter directly through connection options, improving flexibility and reducing the need for driver-specific parameter support.