[PECOBLR-676] passing session params in open session request instead of SET commands#283
Merged
samikshya-db merged 2 commits intodatabricks:mainfrom Aug 22, 2025
Merged
Conversation
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>
nikhilsuri-db
approved these changes
Aug 10, 2025
samikshya-db
approved these changes
Aug 22, 2025
atzoum
pushed a commit
to rudderlabs/sqlconnect-go
that referenced
this pull request
Feb 10, 2026
….8.0 to 1.9.0 (#431) Bumps [github.com/databricks/databricks-sql-go](https://github.com/databricks/databricks-sql-go) from 1.8.0 to 1.9.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/databricks/databricks-sql-go/releases">github.com/databricks/databricks-sql-go's releases</a>.</em></p> <blockquote> <h2>v1.9.0</h2> <h2>What's Changed</h2> <ul> <li>Added support for query tags</li> <li><code>databricks/databricks-sql-go#283</code></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/databricks/databricks-sql-go/compare/v1.8.0...v1.9.0">https://github.com/databricks/databricks-sql-go/compare/v1.8.0...v1.9.0</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/databricks/databricks-sql-go/blob/main/CHANGELOG.md">github.com/databricks/databricks-sql-go's changelog</a>.</em></p> <blockquote> <h2>v1.9.0 (2025-09-17)</h2> <ul> <li>Added support for query tags</li> <li><code>databricks/databricks-sql-go#283</code></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/databricks/databricks-sql-go/commit/9cef5b704a6a3d5b29daf921b2ad159e471867ff"><code>9cef5b7</code></a> Prepare for v1.9.0 release (<a href="https://redirect.github.com/databricks/databricks-sql-go/issues/285">#285</a>)</li> <li><a href="https://github.com/databricks/databricks-sql-go/commit/c256716c926facfb14aa2798c8175c679ffe9530"><code>c256716</code></a> Prepare for v1.9.0 release</li> <li><a href="https://github.com/databricks/databricks-sql-go/commit/5f3e28bf67ec207c09fcf5dc7475d80ce2c469b3"><code>5f3e28b</code></a> [PECOBLR-676] passing session params in open session request instead of SET c...</li> <li><a href="https://github.com/databricks/databricks-sql-go/commit/d7ebf01bed591b30bfae04252e1c54cd63e013f4"><code>d7ebf01</code></a> unit test for query tags</li> <li><a href="https://github.com/databricks/databricks-sql-go/commit/ceaf079f73d0a6e5635d3567cc0277060f961b04"><code>ceaf079</code></a> passing session params in open session request</li> <li><a href="https://github.com/databricks/databricks-sql-go/commit/631401e1c0c5d569c467eeaf3fcca1d8b351d650"><code>631401e</code></a> add log for cloud fetch speed (<a href="https://redirect.github.com/databricks/databricks-sql-go/issues/281">#281</a>)</li> <li>See full diff in <a href="https://github.com/databricks/databricks-sql-go/compare/v1.8.0...v1.9.0">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 refactors session parameter handling in the Go SQL Connector to align with other Databricks drivers (Java, Python). Previously, session parameters were set using
SETstatements after connection establishment, which was inefficient and inconsistent with other drivers. This new implementation also supports usage of QUERY_TAGS session parameter. Query Tags allow users to attach key-value pairs to SQL executions that appear in thesystem.query.historytable.Changes Made:
Refactored Session Parameter Flow (
connector.go):SETstatements afterOpenSessionTOpenSessionReq.Configurationduring session creationCreated Example (
examples/query_tags/main.go):Enhanced Unit Tests (
internal/config/config_test.go):QUERY_TAGSto DSN parsing test to verify parameter extractionChange from User Perspective:
The key difference is in error timing: Previously, invalid session parameters would fail during connection establishment (SET command execution), but now they fail during the first query execution. This happens because the Databricks backend uses lazy validation - it accepts session parameters during connection but validates them only when the first query is executed. This matches Python driver behavior.
Query tags usage example:
How is this tested?
Testing Details:
Unit Tests:
Manual Testing: