Skip to content

Document DSN connection parameters, OAuth, and user agent in README (#196)#388

Merged
vikrantpuppala merged 2 commits into
mainfrom
docs/196-dsn-parameters
Jul 8, 2026
Merged

Document DSN connection parameters, OAuth, and user agent in README (#196)#388
vikrantpuppala merged 2 commits into
mainfrom
docs/196-dsn-parameters

Conversation

@vikrantpuppala

Copy link
Copy Markdown
Collaborator

Summary

Fixes #196. The README documented only PAT (token:) authentication and a handful of connection parameters, even though the driver already supports (and doc.go already lists) several more — including OAuth authentication and the user agent, which the issue specifically asked about.

This PR reworks the "Connecting with DSN" section to close that documentation gap:

  • Adds a consolidated Supported connection parameters table: catalog, schema, maxRows, timeout, userAgentEntry, useCloudFetch, maxDownloadThreads, authType, accessToken, clientID, clientSecret — each with a description and default.
  • Adds worked DSN examples for OAuth machine-to-machine auth (clientID/clientSecret), OAuth user-to-machine auth (authType=OauthU2M), and setting the user agent (userAgentEntry).
  • Notes that unrecognized params (e.g. ansi_mode, timezone) pass through as session parameters.

Test plan

  • Docs-only change; no code was modified (go.mod/go.sum untouched).
  • Parameter names, defaults, and behavior verified against internal/config/config.go:
    • M2M: no token:@ prefix, clientID/clientSecret params, authType=OauthM2M optional.
    • U2M: authType=OauthU2M with no credentials (builds authenticator from host via OIDC discovery).
    • Defaults: maxRows=100000, useCloudFetch=true, maxDownloadThreads=10, timeout=no timeout.
  • The M2M and userAgentEntry DSN forms are already covered by existing tests in internal/config/config_test.go; go test ./internal/config/ passes.

Closes #196

The README documented only PAT (token:) authentication and a handful of
connection parameters, with no guidance on several options that the
driver already supports and doc.go already lists.

Add a consolidated 'Supported connection parameters' table (catalog,
schema, maxRows, timeout, userAgentEntry, useCloudFetch,
maxDownloadThreads, authType, accessToken, clientID, clientSecret) and
worked DSN examples for:
  - OAuth machine-to-machine auth (clientID/clientSecret)
  - OAuth user-to-machine auth (authType=OauthU2M)
  - setting the user agent (userAgentEntry)

Docs-only change; parameter names, defaults, and behavior verified
against internal/config/config.go and its existing tests.

Closes #196

Signed-off-by: Vikrant Puppala <vikrant.puppala@databricks.com>
@vikrantpuppala vikrantpuppala enabled auto-merge (squash) July 8, 2026 10:56
@vikrantpuppala vikrantpuppala merged commit 95d65ff into main Jul 8, 2026
8 checks passed
@vikrantpuppala vikrantpuppala deleted the docs/196-dsn-parameters branch July 8, 2026 11:00
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.

Update readme - how to use client ID and secret as part of DSN

2 participants