Releases: snowflakedb/snowflake-connector-python
Releases · snowflakedb/snowflake-connector-python
Release
New Features
- Reworked authentication internals to allow users to plug custom key-pair authenticators.
- Multi-statement query execution is now supported through cursor.execute and cursor.executemany.
- The Snowflake parameter MULTI_STATEMENT_COUNT can be altered at the account, session, or statement level. An additional argument, num_statements, can be provided to execute to use this parameter at the statement level. It must be provided to executemany to submit a multi-statement query through the method. Note that bulk insert optimizations available through executemany are not available when submitting multi-statement queries.
- By default the parameter is 1, meaning only a single query can be submitted at a time.
- Set to 0 to submit any number of statements in a multi-statement query.
- Set to >1 to submit the specified exact number of statements in a multi-statement query.
- Bindings are accepted in the same way for multi-statements as they are for single statement queries.
- Asynchronous multi-statement query execution is supported. Users should still use get_results_from_sfqid to retrieve results.
- To access the results of each query, users can call SnowflakeCursor.nextset() as specified in the DB 2.0 API (PEP-249), to iterate through each statements results.
- The first statement's results are accessible immediately after calling execute (or get_results_from_sfqid if asynchronous) through the existing fetch*() methods.
- The Snowflake parameter MULTI_STATEMENT_COUNT can be altered at the account, session, or statement level. An additional argument, num_statements, can be provided to execute to use this parameter at the statement level. It must be provided to executemany to submit a multi-statement query through the method. Note that bulk insert optimizations available through executemany are not available when submitting multi-statement queries.
Bug Fixes
- Fixed a bug where the permission of the file downloaded via GET command is changed.
Released to PyPI on December 14, 2022
Release
- Bumped cryptography dependency from <39.0.0 to <41.0.0
- Fixed a bug where expired OCSP response cache caused infinite recursion during cache loading
Release
- Improved performance of OCSP response caching
- During the execution of GET commands we no longer resolve target location on the local machine
- Improved performance of regexes used for PUT/GET SQL statement detection. CVE-2022-42965
Release
- Bumped cryptography dependency from <37.0.0 to <39.0.0
- Bumped pandas dependency from <1.5.0 to <1.6.0
- Fixed a bug where write_pandas wouldn't write an empty DataFrame to Snowflake
- When closing connection async query status checking is now parallelized
- Fixed a bug where test logging would be enabled on Jenkins workers in non-Snowflake Jenkins machines
- Enhanced the atomicity of write_pandas when overwrite is set to True
Release
- Fixed a bug where rowcount was deleted when the cursor was closed
- Fixed a bug where extTypeName was used even when it was empty
- Updated how telemetry entries are constructed
- Added telemetry for imported root packages during run-time
- Added telemetry for using write_pandas
- Fixed missing dtypes when calling fetch_pandas_all() on empty result
- The write_pandas function now supports providing additional arguments to be used by DataFrame.to_parquet
- All optional parameters of write_pandas can now be provided to pd_writer and make_pd_writer to be used with DataFrame.to_sql
Release
- Fixed a bug where timestamps fetched as pandas.DataFrame or pyarrow.Table would overflow for the sake of unnecessary precision. In the case where an overflow cannot be prevented a clear error will be raised now.
- Added in-file caching for OCSP response caching
- The write_pandas function now supports transient tables through the new table_type argument which supersedes create_temp_table argument
- Fixed a bug where calling fetch_pandas_batches incorrectly raised NotSupportedError after an async query was executed
Release
- Added minimum version pin to typing_extensions
Release
- Release wheels are now built on manylinux2014
- Bumped supported pyarrow version to >=8.0.0,<8.1.0
- Updated vendored library versions requests to 2.28.1 and urllib3 to 1.26.10
- Added in-memory cache to OCSP requests
- Added overwrite option to write_pandas
- Added attribute lastrowid to SnowflakeCursor in compliance with PEP249.
- Fixed a bug where gzip compressed http requests might be garbled by an unflushed buffer
- Added new connection diagnostics capabilities to snowflake-connector-python
- Bumped numpy dependency from <1.23.0 to <1.24.0
Release
- Fixed a bug where errors raised during get_results_from_sfqid() were missing errno
- Fixed a bug where empty results containing GEOGRAPHY type raised IndexError
Release
v2.7.8 SNOW-594137: Bumped up PythonConnector PATCH version from 2.7.7 to 2.…