Skip to content

Releases: snowflakedb/drivers

snowflake-connector-python v5.0.0rc1

Pre-release

Choose a tag to compare

Snowflake Connector for Python — Release Notes

Features

  • Added an asyncio API under snowflake.connector.aio for non-blocking connect,
    execute, fetch, and concurrent queries on a single thread.
  • Added typed ConnectionConfig, generated from the shared parameter registry,
    passable via connect(config=...) or built automatically from kwargs.
  • Moved networking, authentication, query execution, result fetching, and
    PUT/GET into a shared Rust core (sf_core) used across universal-driver
    bindings.

Breaking Changes

  • Closed cursors raise InterfaceError (errno=252006) on all operations;
    previously only execute() was guarded and other methods failed with
    TypeError / AttributeError.
  • Fetching or iterating a cursor before any execute raises ProgrammingError
    (errno=252009) instead of TypeError.
  • Removed the public Connection.connect() method; the session is established
    at construction time—create a new connection to reconnect.
  • Removed the region connection parameter and Connection.region; use a
    fully qualified account or set host explicitly.
  • Deprecated client_fetch_threads (alias of client_prefetch_threads);
    client_fetch_use_mp is accepted but has no effect (always a thread pool).
  • Made client_session_keep_alive and
    client_session_keep_alive_heartbeat_frequency read-only; assignment raises
    AttributeError—set them at connection time.
  • Ignored oauth_enable_refresh_tokens (deprecated no-op); refresh tokens are
    always used when the IdP returns one—gate disk caching with
    client_store_temporary_credential.
  • Renamed enable_stage_s3_privatelink_for_us_east_1 to use_s3_regional_url
    (old name remains a deprecated alias).
  • Stopped reading HTTP_PROXY / HTTPS_PROXY / NO_PROXY by default; set
    use_proxy_env=True (or PROXYWITHENV=true) to opt in. Explicit proxy
    params win over env vars.
  • Stopped raising ReauthenticationRequest on master-token expiry (Snowpark
    reauth signal not yet wired).
  • Stopped forcing a hardcoded amazonaws.com.cn S3 endpoint for cn-*
    regions; the AWS SDK resolver is used unless an explicit or regional-URL
    override is set.
  • Stopped setting Content-Encoding: utf-8 on Azure Blob PUT (matches JDBC /
    libsnowflakeclient).
  • Stopped embedding the original filename in the gzip header for compressed
    uploads.

snowflake-odbc v4.0.0-rc1

Pre-release

Choose a tag to compare

Changelog

Breaking changes

  • Changed SQL_C_CHAR conversion of DECIMAL/NUMERIC to return SQL_ERROR (22003) when whole digits do not fit in the buffer; previously returned SQL_SUCCESS_WITH_INFO with truncated digits.
  • Changed SQL_C_BINARY conversion of DECIMAL/NUMERIC/DECFLOAT to return SQL_ERROR (22003) when the buffer is smaller than sizeof(SQL_NUMERIC_STRUCT); previously BufferLength was ignored, risking buffer overflows.
  • Changed conversion of NaN FLOAT/DOUBLE to integer and SQL_C_BIT targets to return SQL_ERROR (22003); previously returned SQL_SUCCESS_WITH_INFO with a silent 0.
  • Enforced interval leading-field precision for SQL_C_INTERVAL_* types: values that exceed the default precision of 2 now return SQL_ERROR (22015), and SQL_DESC_DATETIME_INTERVAL_PRECISION is respected; previously neither was enforced.
  • Changed SQLRowCount with a NULL RowCountPtr to return SQL_ERROR (HY009); previously returned SQL_SUCCESS.
  • Changed SQLBindParameter to return SQL_ERROR (HY104) for a negative DecimalDigits value; previously accepted negative scale silently.
  • Changed conversion of DECFLOAT values with extreme exponents to SQL_C_BINARY to return SQL_ERROR (22003) instead of silently clamping.
  • Changed SQL_C_NUMERIC to VARCHAR conversion to apply the scale from SQL_NUMERIC_STRUCT (e.g. magnitude 12345 with scale 2 produces "123.45"); previously scale was ignored.
  • Changed binding of subnormal double values near DBL_MIN to preserve the value; previously stored as 0.0.
  • Changed TIME to SQL_C_CHAR/SQL_C_WCHAR buffer-too-small handling: a buffer that cannot hold the base time (HH:MM:SS) now returns SQL_ERROR (22003); a buffer that truncates only fractional seconds returns SQL_SUCCESS_WITH_INFO (01004).
  • Changed DATE to SQL_C_BINARY conversion with an undersized buffer to return SQL_ERROR (22003); previously returned SQL_SUCCESS with truncated data.
  • Changed SQLGetFunctions to report SQL_API_SQLCANCELHANDLE as supported; previously returned SQL_FALSE despite the function being exported.
  • Tightened conversion from VARCHAR to SQL_C_INTERVAL_* types. Truncation returns SQL_SUCCESS_WITH_INFO (01S07) and interval-field overflow returns SQL_ERROR (22015).
  • Changed SQL_C_INTERVAL_SECOND with fractional seconds bound to exact-numeric SQL types to truncate the fraction and succeed; previously returned SQL_ERROR (22015).
  • Changed SQLCancel during data-at-execution to discard all accumulated SQLPutData data so a re-entered sequence starts fresh; previously accumulated data from an interrupted sequence could be concatenated into the next sequence.
  • Changed SQLForeignKeys to resolve a NULL FK catalog and schema from the connection context; previously returned an empty result set unless CLIENT_METADATA_REQUEST_USE_CONNECTION_CTX was enabled.
  • Changed SQLSetConnectAttr(SQL_ATTR_LOGIN_TIMEOUT) called after connect to return SQL_ERROR (HY011); previously returned SQL_SUCCESS as a silent no-op.
  • Changed SQLSetStmtAttr(SQL_ATTR_CURSOR_TYPE) for unsupported cursor types to substitute SQL_CURSOR_FORWARD_ONLY and return SQL_SUCCESS_WITH_INFO (01S02); previously accepted any value silently.
  • Changed the ODBC diagnostic vendor prefix from [Snowflake][Support] to [Snowflake][Snowflake ODBC Driver], matching the ODBC spec format [vendor][ODBC-component-identifier].
  • Changed SQLGetInfo(SQL_DRIVER_NAME) to return the loaded driver library's file name (e.g. libsfodbc.so, libsfodbc.dylib, sfodbc.dll) as the ODBC specification prescribes; previously returned the fixed string Snowflake.
  • Changed SQLCancelHandle(SQL_HANDLE_DBC) to return SQL_ERROR (HY010) when an associated statement is asynchronously executing or mid data-at-execution; previously returned SQL_SUCCESS as a no-op.
  • Changed DECFLOAT fetched as SQL_C_CHAR/SQL_C_WCHAR to return normalized scientific notation (e.g. 1.2e200 instead of 12e199).
  • Changed stage array-binding threshold comparison from > to >= and added support for the arrayBindSupported and CLIENT_STAGE_ARRAY_BINDING_THRESHOLD session parameters; previously the server-provided arrayBindSupported flag was ignored.
  • Removed support for the SQL_SF_CONN_ATTR_PRIV_KEY (raw EVP_PKEY*) connection attribute; use PRIV_KEY_CONTENT, PRIV_KEY_BASE64, or PRIV_KEY_FILE instead.
  • Changed OAuth token and authorization endpoint URL validation to require HTTPS; http:// is allowed only for loopback addresses.
  • Changed the SQLSTATE for OAuth IdP token-exchange rejection from HY000 to 28000 (invalid authorization specification).
  • Changed connection setup to reject WIF-only parameters (e.g. WORKLOAD_IDENTITY_PROVIDER) unless AUTHENTICATOR=WORKLOAD_IDENTITY; previously silently ignored them with any other authenticator.
  • Changed WORKLOAD_IDENTITY_IMPERSONATION_PATH with IDENTITY_PROVIDER=OIDC to return a connection error; previously silently ignored the combination.
  • Changed catalog REMARKS and SQLColumns COLUMN_DEF to return SQL_NULL_DATA when absent instead of an empty string, and SQLTables REMARKS now surfaces a SHOW OBJECTS comment when present.
  • Changed SQL_SF_STMT_ATTR_LAST_QUERY_ID to be read-only and fully populated after every statement execution; changed SQL_SF_STMT_ATTR_MULTI_STATEMENT_COUNT to support get/set with a default of -1 (auto-detect); neither attribute was fully implemented in ODBC 3.x.
  • Changed SQLGetDiagRec / SQLGetDiagField message text to append an internal error trace by default; set ErrorTraceEnabled=false in sf.odbc.ini to restore 3.x-shaped message text.
  • Fixed return codes and diagnostics under iODBC to match the ODBC specification: zero-row DML returns SQL_NO_DATA, length-only queries return SQL_SUCCESS, and required SUCCESS_WITH_INFO / HY012 diagnostics are posted correctly.
  • Fixed orphaned child statement handles under iODBC: SQLDisconnect and SQLFreeStmt(SQL_DROP) now invalidate all associated handles through iODBC's alloc table so a subsequent SQLFreeHandle on an orphaned handle returns SQL_INVALID_HANDLE instead of SQL_SUCCESS.
  • Fixed SQLGetDescField and SQLSetDescField called during SQL_NEED_DATA state under iODBC to return SQL_ERROR (HY010); previously returned SQL_SUCCESS.
  • Fixed ODBC 3.x-standard SQLSTATEs under iODBC (e.g. HY090, HY010, HY017, HY092, 07009, HY008); previously returned vendor HY000 or ODBC 2.x aliases.
  • Fixed SQL_C_WCHAR fetch encoding under iODBC to use a uniform UTF-32 width driven by DriverManagerEncoding in sf.odbc.ini; previously the code-unit width varied by Snowflake source column type.
  • Changed proxy resolution so HTTP_PROXY / HTTPS_PROXY / NO_PROXY environment variables are ignored unless USE_PROXY_ENV=true (alias PROXYWITHENV); explicit PROXY= / NO_PROXY= connection parameters still apply. ODBC 3.x fell back to those environment variables when no DSN/simba.snowflake.ini proxy was set. PROXYWITHENV no longer writes the connection's PROXY value into the process environment.
  • Changed SF_GLOBAL_SSL_VERSION (and TLS settings) below TLS 1.2 to fail the connection; previously logged a deprecation warning and still negotiated.
  • Removed support of OCSP certificate validation in favor of CRL validation.

New features

  • Added VECTOR column fetch: VECTOR columns are returned as compact JSON array strings (e.g. [1,2,3]) via SQL_C_CHAR, SQL_C_WCHAR, and SQL_C_BINARY; SQLDescribeCol reports SQL_VARCHAR and SQL_DESC_TYPE_NAME returns VECTOR.
  • Added ALTER USER ADD PROGRAMMATIC ACCESS TOKEN result-set support: the generated token is returned as a result row; ODBC 3.x returned an invalid cursor state for this DDL.
  • Implemented SQLTransact (ODBC 2.x) as a mapping to SQLEndTran, restoring compatibility with ODBC 2.x applications that bypass the Driver Manager.
  • Added TIME to SQL_C_BINARY conversion support.
  • Added SQL_C_BINARY as SQLBindParameter source type for SQL_DECIMAL, SQL_NUMERIC, SQL_TIME, and SQL_TIMESTAMP when the buffer length matches the SQL data length.
  • Added PUT local-path tilde expansion: a leading ~/ or ~ in the source path is expanded to the user's home directory.
  • Added automatic creation of a missing destination directory for GET operations.
  • Added SQLGetDiagField(SQL_DIAG_SERVER_NAME) population: returns the connected server name instead of an empty string.
  • Added SQLGetDiagField(SQL_DIAG_DYNAMIC_FUNCTION) / SQL_DIAG_DYNAMIC_FUNCTION_CODE population after statement execution (e.g. SELECT → 85 / SQL_DIAG_SELECT_CURSOR); previously returned empty / 0.
  • Added SQL_C_BINARY to VARCHAR binding: binary bytes are hex-encoded before send (e.g. 0xDEADBEEF"deadbeef"); ODBC 3.x forwarded raw bytes and the server rejected the request with HTTP 400.
  • Added SQL_SF_TIMESTAMP_TZ parameter binding for SQL_C_TYPE_TIMESTAMP (stored at UTC) and SQL_C_CHAR/SQL_C_WCHAR strings with a +/-HH:MM offset.
  • Added SQLBindParameter support for binding to SQL_INTERVAL_* parameters from same-family SQL_C_INTERVAL_*, SQL_C_CHAR/SQL_C_WCHAR, and exact-numeric C sources (approximate-numeric sources are rejected with SQL_ERROR 07006).
  • Added SQL_SF_CONN_ATTR_APPLICATION as a pre-connect get/set attribute that forwards the application name to the server.
  • Added SQLGetFunctions reporting of SQL_API_SQLSETSCROLLOPTIONS and SQL_API_SQLPARAMOPTIONS as supported under iODBC.

Changes

  • Renamed the default driver registration name to Snowflake ODBC; update DSN Driver= entries that reference SnowflakeDSIIDriver (custom names still configurable via DRIVER_NAME= / SF_DRIVER_NAME).
  • Changed distributable ODBC package filenames to snowflake-odbc-<version>.<arch>.<extension> with u...
Read more

snowflake-odbc v0.0.9

snowflake-odbc v0.0.9 Pre-release
Pre-release

Choose a tag to compare

⚠️ PRIVATE PREVIEW DISCLAIMER ⚠️
This is a beta version of our Universal Driver intended for Snowflake customers who are subject to Snowflake's Preview Terms.
This driver is not ready for use with production data and may be unstable. Please only use it if you are actively participating in the Universal Driver Private Preview.

snowflake-odbc v0.0.8

snowflake-odbc v0.0.8 Pre-release
Pre-release

Choose a tag to compare

⚠️ PRIVATE PREVIEW DISCLAIMER ⚠️
This is a beta version of our Universal Driver intended for Snowflake customers who are subject to Snowflake's Preview Terms.
This driver is not ready for use with production data and may be unstable. Please only use it if you are actively participating in the Universal Driver Private Preview.

snowflake-jdbc v0.0.1

snowflake-jdbc v0.0.1 Pre-release
Pre-release

Choose a tag to compare

SNOW-3704961: chunked streaming PUT — upload RPC + Python file_stream

**Jira:** SNOW-3704961

## What
First of a stacked series replacing the buffered
`ConnectionUploadStream` RPC (single `bytes` field, whole payload
materialized in the wrapper) with a **chunked** one that keeps wrapper
memory bounded to one chunk.

Reference-matched to legacy JDBC's `FileBackedOutputStream`: the wrapper
streams the source in bounded chunks across the FFI; the core
re-materializes them into a re-readable hybrid buffer (RAM up to 128
MiB, spill to temp file beyond) and runs the **existing** upload path
unchanged — so SHA-256 digest, retry, CSE encryption, auto-compress, and
multipart all keep working exactly as for a file-path PUT.

## Design decision: store-and-forward upload (not true streaming)
The wrapper streams the source across the FFI in bounded chunks, but the
**core re-materializes the whole payload** (RAM up to 128 MiB, then
spilled to a temp file) **before** the GS round-trip and cloud upload
begin. This deliberately matches the reference drivers (JDBC
`FileBackedOutputStream`, legacy Python); it is **not** a true
byte-for-byte streaming pipeline. Documented in code at
`sf_core/src/apis/database_driver_v1/stream_transfer.rs` (module
"Operational constraints").

**Pluses**
- Reuses the existing, battle-tested file-path PUT pipeline
**unchanged**: SHA-256 digest, client-side encryption, auto-compress,
multipart, and **full retry** — including whole-transfer restart on
mid-upload credential/stage-token expiry (which requires a re-readable
source).
- Behavioral parity with JDBC / legacy Python; low risk — no new code in
the crypto/retry-critical path.
- Fixes the original problem: the **wrapper** never buffers the whole
file (bounded to ~one chunk).

**Minuses**
- The **core** is not zero-disk for uploads above the 128 MiB in-RAM
threshold: it needs local temp-disk headroom ≈ payload size, does
full-file disk I/O before the first byte reaches cloud storage, and
cannot overlap receive with upload (no streamed progress). A small /
read-only / full tmpdir fails the upload.

**Alternative considered & rejected:** a genuinely-streaming multipart
upload (overlap receive + upload, zero core disk). Rejected for this
stack: it *loses* whole-transfer retry (a consumed stream can't be
replayed), forces the client to pre-hash + pre-measure and drops
core-side auto-compress, and needs a new streaming-multipart
implementation in the crypto-critical path — substantially bigger and
riskier. Left as a documented future escape hatch. (Download, by
contrast, **is** true zero-disk streaming — see the download PRs.)

## Changes
- **Proto:** `UploadStreamHandle` +
`ConnectionUploadStreamBegin/Chunk/Finish/Abort` messages & RPCs (old
`ConnectionUploadStream` kept — JDBC still uses it until the
JDBC-migration PR).
- **Rust core:** `SpooledBuffer` (RAM→temp-file), `UploadStreamSession`
+ begin/chunk/finish/abort handlers, `run_put_stream_via_gs(ByteSource)`
extraction (old RPC delegates to it), handle-manager + proto glue.
- **Python:** `CHUNK_SIZE` (8 MiB) + `upload_stream_*` wrappers on
`CoreDriver`/`AsyncCoreDriver`; `cursor.execute(sql,
file_stream=<BinaryIO>)` (sync + async) via `_execute_upload_stream`.
Best-effort abort on failure never masks the original error. No
client-side PUT regex — the core validates.

## Tests
- **Unit** (mocked core): chunk-loop reassembly, abort-on-error,
finish-fails-then-abort-fails (original error propagates),
large/real-file/empty payloads, disk-spill (Mem→File) via the RPC
handler, sync + async.
- **e2e** (live Snowflake): upload+LS, multi-chunk round-trip,
`AUTO_COMPRESS`→`.gz`, non-PUT `ProgrammingError`.
- `cargo test -p sf_core` green (via `lld`; the sandbox's system `ld`
can't link the nix glibc/openssl — CI/proper build hosts unaffected).

## Full stack (draft series — review & merge bottom-up)

| # | PR | Scope |
|---|----|-------|
| 1 | #767 | chunked streaming **PUT** — upload RPC + Python
`file_stream` (base: `main`) |
| 2 | #813 | zero-disk **S3** streaming in `file_manager` (1/3 of former
#774) |
| 3 | #814 | chunked **download-stream RPCs** (S3) — proto + handlers +
FFI + cancellation (2/3) |
| 4 | #774 | Python **`cursor.download_stream`** over the chunk RPC
(3/3) |
| 5 | #780 | chunked streaming **GET (GCS + Azure)** — zero-disk
producers |
| 6 | #782 | migrate **JDBC** to the chunked RPCs; delete the old
buffered RPCs |

➡️ **You are here: #767**

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
GitOrigin-RevId: 75a52a16fca742f1ecbbd5de126d0840db51d508

snowflake-odbc v0.0.7

snowflake-odbc v0.0.7 Pre-release
Pre-release

Choose a tag to compare

⚠️ PRIVATE PREVIEW DISCLAIMER ⚠️
This is a beta version of our Universal Driver intended for Snowflake customers who are subject to Snowflake's Preview Terms.
This driver is not ready for use with production data and may be unstable. Please only use it if you are actively participating in the Universal Driver Private Preview.

snowflake-connector-python v5.0.0b6

Pre-release

Choose a tag to compare

SNOW-3725940: disable auth e2e tests causing pipeline flakiness

GitOrigin-RevId: 4ada40bd5898b87e40baa53ec00f8b3ab94669c0

snowflake-connector-python v5.0.0b5

Pre-release

Choose a tag to compare

Bump Python connector version to 5.0.0b5

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
GitOrigin-RevId: efe1783c0963929ad2e98208ff79a7d63d77e059

snowflake-odbc v0.0.6

snowflake-odbc v0.0.6 Pre-release
Pre-release

Choose a tag to compare

⚠️ PRIVATE PREVIEW DISCLAIMER ⚠️
This is a beta version of our Universal Driver intended for Snowflake customers who are subject to Snowflake's Preview Terms.
This driver is not ready for use with production data and may be unstable. Please only use it if you are actively participating in the Universal Driver Private Preview.

snowflake-odbc v0.0.5

snowflake-odbc v0.0.5 Pre-release
Pre-release

Choose a tag to compare

⚠️ PRIVATE PREVIEW DISCLAIMER ⚠️
This is a beta version of our Universal Driver intended for Snowflake customers who are subject to Snowflake's Preview Terms.
This driver is not ready for use with production data and may be unstable. Please only use it if you are actively participating in the Universal Driver Private Preview.