Releases: snowflakedb/drivers
Release list
snowflake-connector-python v5.0.0rc1
Snowflake Connector for Python — Release Notes
Features
- Added an asyncio API under
snowflake.connector.aiofor non-blocking connect,
execute, fetch, and concurrent queries on a single thread. - Added typed
ConnectionConfig, generated from the shared parameter registry,
passable viaconnect(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 onlyexecute()was guarded and other methods failed with
TypeError/AttributeError. - Fetching or iterating a cursor before any execute raises
ProgrammingError
(errno=252009) instead ofTypeError. - Removed the public
Connection.connect()method; the session is established
at construction time—create a new connection to reconnect. - Removed the
regionconnection parameter andConnection.region; use a
fully qualifiedaccountor sethostexplicitly. - Deprecated
client_fetch_threads(alias ofclient_prefetch_threads);
client_fetch_use_mpis accepted but has no effect (always a thread pool). - Made
client_session_keep_aliveand
client_session_keep_alive_heartbeat_frequencyread-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_1touse_s3_regional_url
(old name remains a deprecated alias). - Stopped reading
HTTP_PROXY/HTTPS_PROXY/NO_PROXYby default; set
use_proxy_env=True(orPROXYWITHENV=true) to opt in. Explicit proxy
params win over env vars. - Stopped raising
ReauthenticationRequeston master-token expiry (Snowpark
reauth signal not yet wired). - Stopped forcing a hardcoded
amazonaws.com.cnS3 endpoint forcn-*
regions; the AWS SDK resolver is used unless an explicit or regional-URL
override is set. - Stopped setting
Content-Encoding: utf-8on Azure Blob PUT (matches JDBC /
libsnowflakeclient). - Stopped embedding the original filename in the gzip header for compressed
uploads.
snowflake-odbc v4.0.0-rc1
Changelog
Breaking changes
- Changed
SQL_C_CHARconversion of DECIMAL/NUMERIC to returnSQL_ERROR(22003) when whole digits do not fit in the buffer; previously returnedSQL_SUCCESS_WITH_INFOwith truncated digits. - Changed
SQL_C_BINARYconversion of DECIMAL/NUMERIC/DECFLOAT to returnSQL_ERROR(22003) when the buffer is smaller thansizeof(SQL_NUMERIC_STRUCT); previouslyBufferLengthwas ignored, risking buffer overflows. - Changed conversion of NaN
FLOAT/DOUBLEto integer andSQL_C_BITtargets to returnSQL_ERROR(22003); previously returnedSQL_SUCCESS_WITH_INFOwith a silent0. - Enforced interval leading-field precision for
SQL_C_INTERVAL_*types: values that exceed the default precision of 2 now returnSQL_ERROR(22015), andSQL_DESC_DATETIME_INTERVAL_PRECISIONis respected; previously neither was enforced. - Changed
SQLRowCountwith aNULLRowCountPtrto returnSQL_ERROR(HY009); previously returnedSQL_SUCCESS. - Changed
SQLBindParameterto returnSQL_ERROR(HY104) for a negativeDecimalDigitsvalue; previously accepted negative scale silently. - Changed conversion of DECFLOAT values with extreme exponents to
SQL_C_BINARYto returnSQL_ERROR(22003) instead of silently clamping. - Changed
SQL_C_NUMERICtoVARCHARconversion to apply the scale fromSQL_NUMERIC_STRUCT(e.g. magnitude12345with scale2produces"123.45"); previously scale was ignored. - Changed binding of subnormal double values near
DBL_MINto preserve the value; previously stored as0.0. - Changed
TIMEtoSQL_C_CHAR/SQL_C_WCHARbuffer-too-small handling: a buffer that cannot hold the base time (HH:MM:SS) now returnsSQL_ERROR(22003); a buffer that truncates only fractional seconds returnsSQL_SUCCESS_WITH_INFO(01004). - Changed
DATEtoSQL_C_BINARYconversion with an undersized buffer to returnSQL_ERROR(22003); previously returnedSQL_SUCCESSwith truncated data. - Changed
SQLGetFunctionsto reportSQL_API_SQLCANCELHANDLEas supported; previously returnedSQL_FALSEdespite the function being exported. - Tightened conversion from VARCHAR to
SQL_C_INTERVAL_*types. Truncation returnsSQL_SUCCESS_WITH_INFO(01S07) and interval-field overflow returnsSQL_ERROR(22015). - Changed
SQL_C_INTERVAL_SECONDwith fractional seconds bound to exact-numeric SQL types to truncate the fraction and succeed; previously returnedSQL_ERROR(22015). - Changed
SQLCancelduring data-at-execution to discard all accumulatedSQLPutDatadata so a re-entered sequence starts fresh; previously accumulated data from an interrupted sequence could be concatenated into the next sequence. - Changed
SQLForeignKeysto resolve aNULLFK catalog and schema from the connection context; previously returned an empty result set unlessCLIENT_METADATA_REQUEST_USE_CONNECTION_CTXwas enabled. - Changed
SQLSetConnectAttr(SQL_ATTR_LOGIN_TIMEOUT)called after connect to returnSQL_ERROR(HY011); previously returnedSQL_SUCCESSas a silent no-op. - Changed
SQLSetStmtAttr(SQL_ATTR_CURSOR_TYPE)for unsupported cursor types to substituteSQL_CURSOR_FORWARD_ONLYand returnSQL_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 stringSnowflake. - Changed
SQLCancelHandle(SQL_HANDLE_DBC)to returnSQL_ERROR(HY010) when an associated statement is asynchronously executing or mid data-at-execution; previously returnedSQL_SUCCESSas a no-op. - Changed DECFLOAT fetched as
SQL_C_CHAR/SQL_C_WCHARto return normalized scientific notation (e.g.1.2e200instead of12e199). - Changed stage array-binding threshold comparison from
>to>=and added support for thearrayBindSupportedandCLIENT_STAGE_ARRAY_BINDING_THRESHOLDsession parameters; previously the server-providedarrayBindSupportedflag was ignored. - Removed support for the
SQL_SF_CONN_ATTR_PRIV_KEY(rawEVP_PKEY*) connection attribute; usePRIV_KEY_CONTENT,PRIV_KEY_BASE64, orPRIV_KEY_FILEinstead. - 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
HY000to28000(invalid authorization specification). - Changed connection setup to reject WIF-only parameters (e.g.
WORKLOAD_IDENTITY_PROVIDER) unlessAUTHENTICATOR=WORKLOAD_IDENTITY; previously silently ignored them with any other authenticator. - Changed
WORKLOAD_IDENTITY_IMPERSONATION_PATHwithIDENTITY_PROVIDER=OIDCto return a connection error; previously silently ignored the combination. - Changed catalog
REMARKSandSQLColumnsCOLUMN_DEFto returnSQL_NULL_DATAwhen absent instead of an empty string, andSQLTablesREMARKSnow surfaces aSHOW OBJECTScomment when present. - Changed
SQL_SF_STMT_ATTR_LAST_QUERY_IDto be read-only and fully populated after every statement execution; changedSQL_SF_STMT_ATTR_MULTI_STATEMENT_COUNTto support get/set with a default of-1(auto-detect); neither attribute was fully implemented in ODBC 3.x. - Changed
SQLGetDiagRec/SQLGetDiagFieldmessage text to append an internal error trace by default; setErrorTraceEnabled=falseinsf.odbc.inito 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 returnSQL_SUCCESS, and requiredSUCCESS_WITH_INFO/HY012diagnostics are posted correctly. - Fixed orphaned child statement handles under iODBC:
SQLDisconnectandSQLFreeStmt(SQL_DROP)now invalidate all associated handles through iODBC's alloc table so a subsequentSQLFreeHandleon an orphaned handle returnsSQL_INVALID_HANDLEinstead ofSQL_SUCCESS. - Fixed
SQLGetDescFieldandSQLSetDescFieldcalled duringSQL_NEED_DATAstate under iODBC to returnSQL_ERROR(HY010); previously returnedSQL_SUCCESS. - Fixed ODBC 3.x-standard SQLSTATEs under iODBC (e.g.
HY090,HY010,HY017,HY092,07009,HY008); previously returned vendorHY000or ODBC 2.x aliases. - Fixed
SQL_C_WCHARfetch encoding under iODBC to use a uniformUTF-32width driven byDriverManagerEncodinginsf.odbc.ini; previously the code-unit width varied by Snowflake source column type. - Changed proxy resolution so
HTTP_PROXY/HTTPS_PROXY/NO_PROXYenvironment variables are ignored unlessUSE_PROXY_ENV=true(aliasPROXYWITHENV); explicitPROXY=/NO_PROXY=connection parameters still apply. ODBC 3.x fell back to those environment variables when no DSN/simba.snowflake.iniproxy was set.PROXYWITHENVno longer writes the connection'sPROXYvalue 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]) viaSQL_C_CHAR,SQL_C_WCHAR, andSQL_C_BINARY;SQLDescribeColreportsSQL_VARCHARandSQL_DESC_TYPE_NAMEreturnsVECTOR. - Added
ALTER USER ADD PROGRAMMATIC ACCESS TOKENresult-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 toSQLEndTran, restoring compatibility with ODBC 2.x applications that bypass the Driver Manager. - Added
TIMEtoSQL_C_BINARYconversion support. - Added
SQL_C_BINARYasSQLBindParametersource type forSQL_DECIMAL,SQL_NUMERIC,SQL_TIME, andSQL_TIMESTAMPwhen 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
GEToperations. - 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_CODEpopulation after statement execution (e.g. SELECT →85/SQL_DIAG_SELECT_CURSOR); previously returned empty /0. - Added
SQL_C_BINARYtoVARCHARbinding: 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_TZparameter binding forSQL_C_TYPE_TIMESTAMP(stored at UTC) andSQL_C_CHAR/SQL_C_WCHARstrings with a+/-HH:MMoffset. - Added
SQLBindParametersupport for binding toSQL_INTERVAL_*parameters from same-familySQL_C_INTERVAL_*,SQL_C_CHAR/SQL_C_WCHAR, and exact-numeric C sources (approximate-numeric sources are rejected withSQL_ERROR07006). - Added
SQL_SF_CONN_ATTR_APPLICATIONas a pre-connect get/set attribute that forwards the application name to the server. - Added
SQLGetFunctionsreporting ofSQL_API_SQLSETSCROLLOPTIONSandSQL_API_SQLPARAMOPTIONSas supported under iODBC.
Changes
- Renamed the default driver registration name to
Snowflake ODBC; update DSNDriver=entries that referenceSnowflakeDSIIDriver(custom names still configurable viaDRIVER_NAME=/SF_DRIVER_NAME). - Changed distributable ODBC package filenames to
snowflake-odbc-<version>.<arch>.<extension>with u...
snowflake-odbc v0.0.9
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
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
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
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
SNOW-3725940: disable auth e2e tests causing pipeline flakiness GitOrigin-RevId: 4ada40bd5898b87e40baa53ec00f8b3ab94669c0
snowflake-connector-python v5.0.0b5
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
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
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.