Skip to content

Commit 5d984c2

Browse files
ai: apply changes for #913 (3 review threads)
Addresses: - #3799244504 at docs/connection-parameters.md:6 - #3799383910 at docs/connection-parameters.md:90 - #3799696042 at docs/connection-parameters.md:72 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent ef9b6eb commit 5d984c2

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

docs/connection-parameters.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Connection parameter reference
22

3-
This document lists **every public connection / session parameter** the Python
4-
connector (`databricks.sql.connect(...)`) accepts, and — because the driver
3+
This document lists **every public connection / session parameter that is
4+
consumed by at least one currently-supported backend** the Python connector
5+
(`databricks.sql.connect(...)`) accepts, and — because the driver
56
ships more than one backend — whether each parameter is honored on the
67
**Thrift** backend (the default) or the **Kernel** backend (opt-in via
78
`use_kernel=True`).
@@ -70,7 +71,7 @@ to change without notice.
7071
| `access_token` (PAT) | `str` ||| `None` | Personal Access Token / bearer token. The default auth mode when set; otherwise auth falls back to OAuth. |
7172
| `auth_type` | `str` ||| `None` ⇒ Databricks OAuth | `databricks-oauth` or `azure-oauth`. |
7273
| `oauth_client_id` (U2M) | `str` ||| built-in client id | Custom U2M client id. Forwarded on both; when absent, each path applies its own built-in default. |
73-
| `oauth_redirect_port` (U2M) | `int` ||| `None` | Localhost redirect port for the browser flow; required when a custom `oauth_client_id` is set. |
74+
| `oauth_redirect_port` (U2M) | `int` ||| `None` | Localhost redirect port for the browser flow; optional — defaults to the built-in port range 8020–8024 if omitted (even when a custom `oauth_client_id` is set). |
7475
| `oauth_client_secret` (OAuth M2M) | `str` ||| `None` | **Kernel-only in practice.** The Thrift auth path never reads `oauth_client_secret`; use `credentials_provider` or an Azure service principal for M2M on Thrift. |
7576
| `oauth_scopes` | `List[str]` ||| `["sql","offline_access"]`| **Thrift ignores custom scopes** — it always uses the built-in scope set. Only the kernel honors a custom `oauth_scopes`. |
7677
| `credentials_provider` | `CredentialsProvider`||| `None` | Custom external credentials provider. **Rejected on the kernel path** (`NotSupportedError`) — it is an opaque token source, so the kernel cannot own the token lifecycle; use `oauth_client_id` + `oauth_client_secret` for M2M, or the Thrift backend. |
@@ -82,6 +83,14 @@ to change without notice.
8283

8384
## HTTP client, proxy, retries
8485

86+
> **Retry defaults are Thrift defaults.** The **Default Value** column lists the
87+
> values the *Thrift* backend applies. For the ✅-Kernel retry rows
88+
> (`_retry_stop_after_attempts_count` / `_duration`, `_retry_delay_min` /
89+
> `_max`), `session.py` forwards each as `kwargs.get(...)` **with no fallback**,
90+
> so when a caller omits one, `None` is passed and the kernel's Rust retry
91+
> policy supplies **its own** default — which is not guaranteed to match the
92+
> Thrift value shown here.
93+
8594
| Option | Type | Thrift | Kernel | Default Value | Note |
8695
| ------------------------------------ | ----------- | :----: | :----: | ------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
8796
| `_socket_timeout` | `float` (s) ||| `900` | Socket send/recv/connect timeout. Not forwarded to the kernel, which manages its own request timeout. |

0 commit comments

Comments
 (0)