snowflake-connector-python 3.15.0__tar.gz → 3.16.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/DESCRIPTION.md +11 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/MANIFEST.in +1 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/PKG-INFO +13 -2
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/setup.cfg +1 -1
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/setup.py +1 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/arrow_context.py +39 -1
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/_oauth_base.py +34 -1
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/by_plugin.py +1 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/oauth_code.py +92 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/oauth_credentials.py +2 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/webbrowser.py +4 -3
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/bind_upload_agent.py +6 -2
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/connection.py +44 -56
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/cursor.py +6 -2
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/direct_file_operation_utils.py +31 -3
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/file_transfer_agent.py +20 -8
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/gcs_storage_client.py +1 -1
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.cpp +31 -0
- snowflake_connector_python-3.16.0/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntervalConverter.cpp +71 -0
- snowflake_connector_python-3.16.0/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntervalConverter.hpp +56 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.cpp +2 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.hpp +2 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/network.py +62 -4
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/pandas_tools.py +57 -44
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/result_batch.py +40 -7
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/result_set.py +40 -8
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/version.py +1 -1
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/wif_util.py +84 -4
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake_connector_python.egg-info/PKG-INFO +13 -2
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake_connector_python.egg-info/SOURCES.txt +2 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake_connector_python.egg-info/requires.txt +1 -1
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/CONTRIBUTING.md +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/LICENSE.txt +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/NOTICE +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/README.md +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/SECURITY.md +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/pyproject.toml +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/_query_context_cache.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/_sql_util.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/_utils.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/_auth.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/_http_server.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/default.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/idtoken.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/keypair.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/no_auth.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/oauth.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/okta.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/pat.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/usrpwdmfa.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/auth/workload_identity.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/azure_storage_client.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/backoff_policies.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/cache.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/compat.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/config_manager.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/connection_diagnostic.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/constants.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/converter.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/converter_issue23517.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/converter_null.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/converter_snowsql.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/dbapi.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/description.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/encryption_util.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/errorcode.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/errors.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/externals_utils/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/externals_utils/externals_setup.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/feature.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/file_compression_type.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/file_lock.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/file_util.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/gzip_decoder.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/local_storage_client.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/log_configuration.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/logging_utils/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/logging_utils/filters.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecFloatConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecFloatConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IColumnConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/LICENSE.txt +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/macros.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_accessors.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_alloc.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_assert.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_builder.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_emitter.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_endian.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_epilogue.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_flatbuffers.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_identifier.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_iov.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_prologue.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_refmap.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_rtconfig.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_types.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_verifier.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/flatcc_portable.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/paligned_alloc.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pattributes.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_pop.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_push.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian_detect.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinline.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinttypes.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable_basic.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstatic_assert.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdalign.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdint.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/punaligned.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pversion.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pwarnings.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc.c +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.c +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_arrow_iterator.pyx +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.c +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.c +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.h +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.cpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.hpp +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/ocsp_asn1crypto.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/ocsp_snowflake.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/options.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/proxy.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/py.typed +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/s3_storage_client.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/secret_detector.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/sf_dirs.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/sfbinaryformat.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/sfdatetime.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/snow_logging.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/sqlstate.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/ssd_internal_keys.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/ssl_wrap_socket.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/storage_client.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/telemetry.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/telemetry_oob.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/test_util.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/time_util.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/token_cache.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/tool/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/tool/dump_certs.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/tool/dump_ocsp_response.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/tool/dump_ocsp_response_cache.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/tool/probe_connection.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/url_util.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/util_text.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/LICENSE +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/__version__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/_internal_utils.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/adapters.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/api.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/auth.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/certs.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/compat.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/cookies.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/exceptions.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/help.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/hooks.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/models.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/sessions.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/status_codes.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/structures.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/requests/utils.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/LICENSE.txt +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/_collections.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/_version.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/connection.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/connectionpool.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/_appengine_environ.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/bindings.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/low_level.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/appengine.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/ntlmpool.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/securetransport.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/contrib/socks.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/exceptions.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/fields.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/filepost.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/packages/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/packages/backports/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/packages/backports/makefile.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/packages/backports/weakref_finalize.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/packages/six.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/poolmanager.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/request.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/response.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/__init__.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/connection.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/proxy.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/queue.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/request.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/response.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/retry.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/ssl_.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/ssl_match_hostname.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/ssltransport.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/timeout.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/url.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake/connector/vendored/urllib3/util/wait.py +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake_connector_python.egg-info/dependency_links.txt +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake_connector_python.egg-info/entry_points.txt +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake_connector_python.egg-info/not-zip-safe +0 -0
- {snowflake_connector_python-3.15.0 → snowflake_connector_python-3.16.0}/src/snowflake_connector_python.egg-info/top_level.txt +0 -0
|
@@ -7,6 +7,17 @@ https://docs.snowflake.com/
|
|
|
7
7
|
Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python
|
|
8
8
|
|
|
9
9
|
# Release Notes
|
|
10
|
+
- v3.16.0(July 04,2025)
|
|
11
|
+
- Bumped numpy dependency from <2.1.0 to <=2.2.4.
|
|
12
|
+
- Added Windows support for Python 3.13.
|
|
13
|
+
- Added `bulk_upload_chunks` parameter to `write_pandas` function. Setting this parameter to True changes the behaviour of write_pandas function to first write all the data chunks to the local disk and then perform the wildcard upload of the chunks folder to the stage. In default behaviour the chunks are being saved, uploaded and deleted one by one.
|
|
14
|
+
- Added support for new authentication mechanism PAT with external session ID.
|
|
15
|
+
- Added `client_fetch_use_mp` parameter that enables multiprocessed fetching of result batches.
|
|
16
|
+
- Added basic arrow support for Interval types.
|
|
17
|
+
- Fixed `write_pandas` special characters usage in the location name.
|
|
18
|
+
- Fixed usage of `use_virtual_url` when building the location for gcs storage client.
|
|
19
|
+
- Added support for Snowflake OAuth for local applications.
|
|
20
|
+
|
|
10
21
|
- v3.15.0(Apr 29,2025)
|
|
11
22
|
- Bumped up min boto and botocore version to 1.24.
|
|
12
23
|
- OCSP: terminate certificates chain traversal if a trusted certificate already reached.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snowflake-connector-python
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.16.0
|
|
4
4
|
Summary: Snowflake Connector for Python
|
|
5
5
|
Home-page: https://www.snowflake.com/
|
|
6
6
|
Author: Snowflake, Inc
|
|
@@ -61,7 +61,7 @@ Provides-Extra: development
|
|
|
61
61
|
Requires-Dist: Cython; extra == "development"
|
|
62
62
|
Requires-Dist: coverage; extra == "development"
|
|
63
63
|
Requires-Dist: more-itertools; extra == "development"
|
|
64
|
-
Requires-Dist: numpy
|
|
64
|
+
Requires-Dist: numpy<=2.2.4; extra == "development"
|
|
65
65
|
Requires-Dist: pendulum!=2.1.1; extra == "development"
|
|
66
66
|
Requires-Dist: pexpect; extra == "development"
|
|
67
67
|
Requires-Dist: pytest<7.5.0; extra == "development"
|
|
@@ -86,6 +86,17 @@ https://docs.snowflake.com/
|
|
|
86
86
|
Source code is also available at: https://github.com/snowflakedb/snowflake-connector-python
|
|
87
87
|
|
|
88
88
|
# Release Notes
|
|
89
|
+
- v3.16.0(July 04,2025)
|
|
90
|
+
- Bumped numpy dependency from <2.1.0 to <=2.2.4.
|
|
91
|
+
- Added Windows support for Python 3.13.
|
|
92
|
+
- Added `bulk_upload_chunks` parameter to `write_pandas` function. Setting this parameter to True changes the behaviour of write_pandas function to first write all the data chunks to the local disk and then perform the wildcard upload of the chunks folder to the stage. In default behaviour the chunks are being saved, uploaded and deleted one by one.
|
|
93
|
+
- Added support for new authentication mechanism PAT with external session ID.
|
|
94
|
+
- Added `client_fetch_use_mp` parameter that enables multiprocessed fetching of result batches.
|
|
95
|
+
- Added basic arrow support for Interval types.
|
|
96
|
+
- Fixed `write_pandas` special characters usage in the location name.
|
|
97
|
+
- Fixed usage of `use_virtual_url` when building the location for gcs storage client.
|
|
98
|
+
- Added support for Snowflake OAuth for local applications.
|
|
99
|
+
|
|
89
100
|
- v3.15.0(Apr 29,2025)
|
|
90
101
|
- Bumped up min boto and botocore version to 1.24.
|
|
91
102
|
- OCSP: terminate certificates chain traversal if a trusted certificate already reached.
|
|
@@ -103,6 +103,7 @@ if _ABLE_TO_COMPILE_EXTENSIONS and not SNOWFLAKE_DISABLE_COMPILE_ARROW_EXTENSION
|
|
|
103
103
|
"FixedSizeListConverter.cpp",
|
|
104
104
|
"FloatConverter.cpp",
|
|
105
105
|
"IntConverter.cpp",
|
|
106
|
+
"IntervalConverter.cpp",
|
|
106
107
|
"MapConverter.cpp",
|
|
107
108
|
"ObjectConverter.cpp",
|
|
108
109
|
"SnowflakeType.cpp",
|
|
@@ -15,7 +15,7 @@ from .constants import PARAMETER_TIMEZONE
|
|
|
15
15
|
from .converter import _generate_tzinfo_from_tzoffset
|
|
16
16
|
|
|
17
17
|
if TYPE_CHECKING:
|
|
18
|
-
from numpy import datetime64, float64, int64
|
|
18
|
+
from numpy import datetime64, float64, int64, timedelta64
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
try:
|
|
@@ -163,3 +163,41 @@ class ArrowConverterContext:
|
|
|
163
163
|
|
|
164
164
|
def DECFLOAT_to_numpy_float64(self, exponent: int, significand: bytes) -> float64:
|
|
165
165
|
return numpy.float64(self.DECFLOAT_to_decimal(exponent, significand))
|
|
166
|
+
|
|
167
|
+
def INTERVAL_YEAR_MONTH_to_numpy_timedelta(self, months: int) -> timedelta64:
|
|
168
|
+
return numpy.timedelta64(months, "M")
|
|
169
|
+
|
|
170
|
+
def INTERVAL_DAY_TIME_int_to_numpy_timedelta(self, nanos: int) -> timedelta64:
|
|
171
|
+
return numpy.timedelta64(nanos, "ns")
|
|
172
|
+
|
|
173
|
+
def INTERVAL_DAY_TIME_int_to_timedelta(self, nanos: int) -> timedelta:
|
|
174
|
+
# Python timedelta only supports microsecond precision. We receive value in
|
|
175
|
+
# nanoseconds.
|
|
176
|
+
return timedelta(microseconds=nanos // 1000)
|
|
177
|
+
|
|
178
|
+
def INTERVAL_DAY_TIME_decimal_to_numpy_timedelta(self, value: bytes) -> timedelta64:
|
|
179
|
+
# Snowflake supports up to 9 digits leading field precision for the day-time
|
|
180
|
+
# interval. That when represented in nanoseconds can not be stored in a 64-bit
|
|
181
|
+
# integer. So we send these as Decimal128 from server to client.
|
|
182
|
+
# Arrow uses little-endian by default.
|
|
183
|
+
# https://arrow.apache.org/docs/format/Columnar.html#byte-order-endianness
|
|
184
|
+
nanos = int.from_bytes(value, byteorder="little", signed=True)
|
|
185
|
+
# Numpy timedelta only supports up to 64-bit integers, so we need to change the
|
|
186
|
+
# unit to milliseconds to avoid overflow.
|
|
187
|
+
# Max value received from server
|
|
188
|
+
# = 10**9 * NANOS_PER_DAY - 1
|
|
189
|
+
# = 86399999999999999999999 nanoseconds
|
|
190
|
+
# = 86399999999999999 milliseconds
|
|
191
|
+
# math.log2(86399999999999999) = 56.3 < 64
|
|
192
|
+
return numpy.timedelta64(nanos // 1_000_000, "ms")
|
|
193
|
+
|
|
194
|
+
def INTERVAL_DAY_TIME_decimal_to_timedelta(self, value: bytes) -> timedelta:
|
|
195
|
+
# Snowflake supports up to 9 digits leading field precision for the day-time
|
|
196
|
+
# interval. That when represented in nanoseconds can not be stored in a 64-bit
|
|
197
|
+
# integer. So we send these as Decimal128 from server to client.
|
|
198
|
+
# Arrow uses little-endian by default.
|
|
199
|
+
# https://arrow.apache.org/docs/format/Columnar.html#byte-order-endianness
|
|
200
|
+
nanos = int.from_bytes(value, byteorder="little", signed=True)
|
|
201
|
+
# Python timedelta only supports microsecond precision. We receive value in
|
|
202
|
+
# nanoseconds.
|
|
203
|
+
return timedelta(microseconds=nanos // 1000)
|
|
@@ -12,7 +12,13 @@ from abc import ABC, abstractmethod
|
|
|
12
12
|
from typing import TYPE_CHECKING, Any
|
|
13
13
|
from urllib.error import HTTPError, URLError
|
|
14
14
|
|
|
15
|
-
from ..errorcode import
|
|
15
|
+
from ..errorcode import (
|
|
16
|
+
ER_FAILED_TO_REQUEST,
|
|
17
|
+
ER_IDP_CONNECTION_ERROR,
|
|
18
|
+
ER_NO_CLIENT_ID,
|
|
19
|
+
ER_NO_CLIENT_SECRET,
|
|
20
|
+
)
|
|
21
|
+
from ..errors import Error, ProgrammingError
|
|
16
22
|
from ..network import OAUTH_AUTHENTICATOR
|
|
17
23
|
from ..secret_detector import SecretDetector
|
|
18
24
|
from ..token_cache import TokenCache, TokenKey, TokenType
|
|
@@ -185,6 +191,33 @@ class AuthByOAuthBase(AuthByPlugin, _OAuthTokensMixin, ABC):
|
|
|
185
191
|
"""Returns the token."""
|
|
186
192
|
return self._access_token or ""
|
|
187
193
|
|
|
194
|
+
@staticmethod
|
|
195
|
+
def _validate_client_credentials_present(
|
|
196
|
+
client_id: str, client_secret: str, connection: SnowflakeConnection
|
|
197
|
+
) -> tuple[str, str]:
|
|
198
|
+
if client_id is None or client_id == "":
|
|
199
|
+
Error.errorhandler_wrapper(
|
|
200
|
+
connection,
|
|
201
|
+
None,
|
|
202
|
+
ProgrammingError,
|
|
203
|
+
{
|
|
204
|
+
"msg": "Oauth code flow requirement 'client_id' is empty",
|
|
205
|
+
"errno": ER_NO_CLIENT_ID,
|
|
206
|
+
},
|
|
207
|
+
)
|
|
208
|
+
if client_secret is None or client_secret == "":
|
|
209
|
+
Error.errorhandler_wrapper(
|
|
210
|
+
connection,
|
|
211
|
+
None,
|
|
212
|
+
ProgrammingError,
|
|
213
|
+
{
|
|
214
|
+
"msg": "Oauth code flow requirement 'client_secret' is empty",
|
|
215
|
+
"errno": ER_NO_CLIENT_SECRET,
|
|
216
|
+
},
|
|
217
|
+
)
|
|
218
|
+
|
|
219
|
+
return client_id, client_secret
|
|
220
|
+
|
|
188
221
|
def reauthenticate(
|
|
189
222
|
self,
|
|
190
223
|
*,
|
|
@@ -18,11 +18,13 @@ from typing import TYPE_CHECKING, Any
|
|
|
18
18
|
from ..compat import parse_qs, urlparse, urlsplit
|
|
19
19
|
from ..constants import OAUTH_TYPE_AUTHORIZATION_CODE
|
|
20
20
|
from ..errorcode import (
|
|
21
|
+
ER_INVALID_VALUE,
|
|
21
22
|
ER_OAUTH_CALLBACK_ERROR,
|
|
22
23
|
ER_OAUTH_SERVER_TIMEOUT,
|
|
23
24
|
ER_OAUTH_STATE_CHANGED,
|
|
24
25
|
ER_UNABLE_TO_OPEN_BROWSER,
|
|
25
26
|
)
|
|
27
|
+
from ..errors import Error, ProgrammingError
|
|
26
28
|
from ..token_cache import TokenCache
|
|
27
29
|
from ._http_server import AuthHttpServer
|
|
28
30
|
from ._oauth_base import AuthByOAuthBase
|
|
@@ -45,6 +47,8 @@ def _get_query_params(
|
|
|
45
47
|
class AuthByOauthCode(AuthByOAuthBase):
|
|
46
48
|
"""Authenticates user by OAuth code flow."""
|
|
47
49
|
|
|
50
|
+
_LOCAL_APPLICATION_CLIENT_CREDENTIALS = "LOCAL_APPLICATION"
|
|
51
|
+
|
|
48
52
|
def __init__(
|
|
49
53
|
self,
|
|
50
54
|
application: str,
|
|
@@ -54,13 +58,27 @@ class AuthByOauthCode(AuthByOAuthBase):
|
|
|
54
58
|
token_request_url: str,
|
|
55
59
|
redirect_uri: str,
|
|
56
60
|
scope: str,
|
|
61
|
+
host: str,
|
|
57
62
|
pkce_enabled: bool = True,
|
|
58
63
|
token_cache: TokenCache | None = None,
|
|
59
64
|
refresh_token_enabled: bool = False,
|
|
60
65
|
external_browser_timeout: int | None = None,
|
|
61
66
|
enable_single_use_refresh_tokens: bool = False,
|
|
67
|
+
connection: SnowflakeConnection | None = None,
|
|
62
68
|
**kwargs,
|
|
63
69
|
) -> None:
|
|
70
|
+
authentication_url, redirect_uri = self._validate_oauth_code_uris(
|
|
71
|
+
authentication_url, redirect_uri, connection
|
|
72
|
+
)
|
|
73
|
+
client_id, client_secret = self._validate_client_credentials_with_defaults(
|
|
74
|
+
client_id,
|
|
75
|
+
client_secret,
|
|
76
|
+
authentication_url,
|
|
77
|
+
token_request_url,
|
|
78
|
+
host,
|
|
79
|
+
connection,
|
|
80
|
+
)
|
|
81
|
+
|
|
64
82
|
super().__init__(
|
|
65
83
|
client_id=client_id,
|
|
66
84
|
client_secret=client_secret,
|
|
@@ -385,3 +403,77 @@ You can close this window now and go back where you started from.
|
|
|
385
403
|
},
|
|
386
404
|
)
|
|
387
405
|
return parsed.get("code", [None])[0], parsed.get("state", [None])[0]
|
|
406
|
+
|
|
407
|
+
@staticmethod
|
|
408
|
+
def _is_snowflake_as_idp(
|
|
409
|
+
authentication_url: str, token_request_url: str, host: str
|
|
410
|
+
) -> bool:
|
|
411
|
+
return (authentication_url == "" or host in authentication_url) and (
|
|
412
|
+
token_request_url == "" or host in token_request_url
|
|
413
|
+
)
|
|
414
|
+
|
|
415
|
+
def _eligible_for_default_client_credentials(
|
|
416
|
+
self,
|
|
417
|
+
client_id: str,
|
|
418
|
+
client_secret: str,
|
|
419
|
+
authorization_url: str,
|
|
420
|
+
token_request_url: str,
|
|
421
|
+
host: str,
|
|
422
|
+
) -> bool:
|
|
423
|
+
return (
|
|
424
|
+
(client_id == "" or client_secret is None)
|
|
425
|
+
and (client_secret == "" or client_secret is None)
|
|
426
|
+
and self.__class__._is_snowflake_as_idp(
|
|
427
|
+
authorization_url, token_request_url, host
|
|
428
|
+
)
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
def _validate_client_credentials_with_defaults(
|
|
432
|
+
self,
|
|
433
|
+
client_id: str,
|
|
434
|
+
client_secret: str,
|
|
435
|
+
authorization_url: str,
|
|
436
|
+
token_request_url: str,
|
|
437
|
+
host: str,
|
|
438
|
+
connection: SnowflakeConnection,
|
|
439
|
+
) -> tuple[str, str] | None:
|
|
440
|
+
if self._eligible_for_default_client_credentials(
|
|
441
|
+
client_id, client_secret, authorization_url, token_request_url, host
|
|
442
|
+
):
|
|
443
|
+
return (
|
|
444
|
+
self.__class__._LOCAL_APPLICATION_CLIENT_CREDENTIALS,
|
|
445
|
+
self.__class__._LOCAL_APPLICATION_CLIENT_CREDENTIALS,
|
|
446
|
+
)
|
|
447
|
+
else:
|
|
448
|
+
self._validate_client_credentials_present(
|
|
449
|
+
client_id, client_secret, connection
|
|
450
|
+
)
|
|
451
|
+
return client_id, client_secret
|
|
452
|
+
|
|
453
|
+
@staticmethod
|
|
454
|
+
def _validate_oauth_code_uris(
|
|
455
|
+
authorization_url: str, redirect_uri: str, connection: SnowflakeConnection
|
|
456
|
+
) -> tuple[str, str]:
|
|
457
|
+
if authorization_url and not authorization_url.startswith("https://"):
|
|
458
|
+
Error.errorhandler_wrapper(
|
|
459
|
+
connection,
|
|
460
|
+
None,
|
|
461
|
+
ProgrammingError,
|
|
462
|
+
{
|
|
463
|
+
"msg": "OAuth supports only authorization urls that use 'https' scheme",
|
|
464
|
+
"errno": ER_INVALID_VALUE,
|
|
465
|
+
},
|
|
466
|
+
)
|
|
467
|
+
if redirect_uri and not (
|
|
468
|
+
redirect_uri.startswith("http://") or redirect_uri.startswith("https://")
|
|
469
|
+
):
|
|
470
|
+
Error.errorhandler_wrapper(
|
|
471
|
+
connection,
|
|
472
|
+
None,
|
|
473
|
+
ProgrammingError,
|
|
474
|
+
{
|
|
475
|
+
"msg": "OAuth supports only authorization urls that use 'http(s)' scheme",
|
|
476
|
+
"errno": ER_INVALID_VALUE,
|
|
477
|
+
},
|
|
478
|
+
)
|
|
479
|
+
return authorization_url, redirect_uri
|
|
@@ -29,8 +29,10 @@ class AuthByOauthCredentials(AuthByOAuthBase):
|
|
|
29
29
|
scope: str,
|
|
30
30
|
token_cache: TokenCache | None = None,
|
|
31
31
|
refresh_token_enabled: bool = False,
|
|
32
|
+
connection: SnowflakeConnection | None = None,
|
|
32
33
|
**kwargs,
|
|
33
34
|
) -> None:
|
|
35
|
+
self._validate_client_credentials_present(client_id, client_secret, connection)
|
|
34
36
|
super().__init__(
|
|
35
37
|
client_id=client_id,
|
|
36
38
|
client_secret=client_secret,
|
|
@@ -124,18 +124,19 @@ class AuthByWebBrowser(AuthByPlugin):
|
|
|
124
124
|
socket_connection.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
|
|
125
125
|
|
|
126
126
|
try:
|
|
127
|
+
hostname = os.getenv("SF_AUTH_SOCKET_ADDR", "localhost")
|
|
127
128
|
try:
|
|
128
129
|
socket_connection.bind(
|
|
129
130
|
(
|
|
130
|
-
|
|
131
|
+
hostname,
|
|
131
132
|
int(os.getenv("SF_AUTH_SOCKET_PORT", 0)),
|
|
132
133
|
)
|
|
133
134
|
)
|
|
134
135
|
except socket.gaierror as ex:
|
|
135
136
|
if ex.args[0] == socket.EAI_NONAME:
|
|
136
137
|
raise OperationalError(
|
|
137
|
-
msg="
|
|
138
|
-
"
|
|
138
|
+
msg=f"{hostname} is not found. Ensure /etc/hosts has "
|
|
139
|
+
f"{hostname} entry.",
|
|
139
140
|
errno=ER_NO_HOSTNAME_FOUND,
|
|
140
141
|
)
|
|
141
142
|
else:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env python
|
|
2
2
|
from __future__ import annotations
|
|
3
3
|
|
|
4
|
+
import os
|
|
4
5
|
import uuid
|
|
5
6
|
from io import BytesIO
|
|
6
7
|
from logging import getLogger
|
|
@@ -76,8 +77,11 @@ class BindUploadAgent:
|
|
|
76
77
|
if row_idx >= len(self.rows) or size >= self._stream_buffer_size:
|
|
77
78
|
break
|
|
78
79
|
try:
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
f.seek(0)
|
|
81
|
+
self.cursor._upload_stream(
|
|
82
|
+
input_stream=f,
|
|
83
|
+
stage_location=os.path.join(self.stage_path, f"{row_idx}.csv"),
|
|
84
|
+
options={"source_compression": "auto_detect"},
|
|
81
85
|
)
|
|
82
86
|
except Error as err:
|
|
83
87
|
logger.debug("Failed to upload the bindings file to stage.")
|
|
@@ -92,8 +92,6 @@ from .errorcode import (
|
|
|
92
92
|
ER_INVALID_VALUE,
|
|
93
93
|
ER_INVALID_WIF_SETTINGS,
|
|
94
94
|
ER_NO_ACCOUNT_NAME,
|
|
95
|
-
ER_NO_CLIENT_ID,
|
|
96
|
-
ER_NO_CLIENT_SECRET,
|
|
97
95
|
ER_NO_NUMPY,
|
|
98
96
|
ER_NO_PASSWORD,
|
|
99
97
|
ER_NO_USER,
|
|
@@ -109,6 +107,7 @@ from .network import (
|
|
|
109
107
|
OAUTH_AUTHENTICATOR,
|
|
110
108
|
OAUTH_AUTHORIZATION_CODE,
|
|
111
109
|
OAUTH_CLIENT_CREDENTIALS,
|
|
110
|
+
PAT_WITH_EXTERNAL_SESSION,
|
|
112
111
|
PROGRAMMATIC_ACCESS_TOKEN,
|
|
113
112
|
REQUEST_ID,
|
|
114
113
|
USR_PWD_MFA_AUTHENTICATOR,
|
|
@@ -230,6 +229,7 @@ DEFAULT_CONFIGURATION: dict[str, tuple[Any, type | tuple[type, ...]]] = {
|
|
|
230
229
|
), # snowflake
|
|
231
230
|
"client_prefetch_threads": (4, int), # snowflake
|
|
232
231
|
"client_fetch_threads": (None, (type(None), int)),
|
|
232
|
+
"client_fetch_use_mp": (False, bool),
|
|
233
233
|
"numpy": (False, bool), # snowflake
|
|
234
234
|
"ocsp_response_cache_filename": (None, (type(None), str)), # snowflake internal
|
|
235
235
|
"converter_class": (DefaultConverterClass(), SnowflakeConverter),
|
|
@@ -340,7 +340,7 @@ DEFAULT_CONFIGURATION: dict[str, tuple[Any, type | tuple[type, ...]]] = {
|
|
|
340
340
|
str,
|
|
341
341
|
# SNOW-1825621: OAUTH implementation
|
|
342
342
|
),
|
|
343
|
-
"oauth_redirect_uri": ("http://127.0.0.1
|
|
343
|
+
"oauth_redirect_uri": ("http://127.0.0.1", str),
|
|
344
344
|
"oauth_scope": (
|
|
345
345
|
"",
|
|
346
346
|
str,
|
|
@@ -364,6 +364,11 @@ DEFAULT_CONFIGURATION: dict[str, tuple[Any, type | tuple[type, ...]]] = {
|
|
|
364
364
|
True,
|
|
365
365
|
bool,
|
|
366
366
|
), # SNOW-XXXXX: remove the check_arrow_conversion_error_on_every_column flag
|
|
367
|
+
"external_session_id": (
|
|
368
|
+
None,
|
|
369
|
+
str,
|
|
370
|
+
# SNOW-2096721: External (Spark) session ID
|
|
371
|
+
),
|
|
367
372
|
}
|
|
368
373
|
|
|
369
374
|
APPLICATION_RE = re.compile(r"[\w\d_]+")
|
|
@@ -424,7 +429,9 @@ class SnowflakeConnection:
|
|
|
424
429
|
See the backoff_policies module for details and implementation examples.
|
|
425
430
|
client_session_keep_alive_heartbeat_frequency: Heartbeat frequency to keep connection alive in seconds.
|
|
426
431
|
client_prefetch_threads: Number of threads to download the result set.
|
|
427
|
-
client_fetch_threads: Number of threads to fetch staged query results.
|
|
432
|
+
client_fetch_threads: Number of threads (or processes) to fetch staged query results.
|
|
433
|
+
If not specified, reuses client_prefetch_threads value.
|
|
434
|
+
client_fetch_use_mp: Enables multiprocessing for fetching query results in parallel.
|
|
428
435
|
rest: Snowflake REST API object. Internal use only. Maybe removed in a later release.
|
|
429
436
|
application: Application name to communicate with Snowflake as. By default, this is "PythonConnector".
|
|
430
437
|
errorhandler: Handler used with errors. By default, an exception will be raised on error.
|
|
@@ -499,10 +506,9 @@ class SnowflakeConnection:
|
|
|
499
506
|
is_kwargs_empty = not kwargs
|
|
500
507
|
|
|
501
508
|
if "application" not in kwargs:
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
kwargs["application"] = "streamlit"
|
|
509
|
+
app = self._detect_application()
|
|
510
|
+
if app:
|
|
511
|
+
kwargs["application"] = app
|
|
506
512
|
|
|
507
513
|
if "insecure_mode" in kwargs:
|
|
508
514
|
warn_message = "The 'insecure_mode' connection property is deprecated. Please use 'disable_ocsp_checks' instead"
|
|
@@ -698,6 +704,10 @@ class SnowflakeConnection:
|
|
|
698
704
|
value = min(max(1, value), MAX_CLIENT_FETCH_THREADS)
|
|
699
705
|
self._client_fetch_threads = value
|
|
700
706
|
|
|
707
|
+
@property
|
|
708
|
+
def client_fetch_use_mp(self) -> bool:
|
|
709
|
+
return self._client_fetch_use_mp
|
|
710
|
+
|
|
701
711
|
@property
|
|
702
712
|
def rest(self) -> SnowflakeRestful | None:
|
|
703
713
|
return self._rest
|
|
@@ -1204,7 +1214,6 @@ class SnowflakeConnection:
|
|
|
1204
1214
|
backoff_generator=self._backoff_generator,
|
|
1205
1215
|
)
|
|
1206
1216
|
elif self._authenticator == OAUTH_AUTHORIZATION_CODE:
|
|
1207
|
-
self._check_oauth_parameters()
|
|
1208
1217
|
if self._role and (self._oauth_scope == ""):
|
|
1209
1218
|
# if role is known then let's inject it into scope
|
|
1210
1219
|
self._oauth_scope = _OAUTH_DEFAULT_SCOPE.format(role=self._role)
|
|
@@ -1212,6 +1221,7 @@ class SnowflakeConnection:
|
|
|
1212
1221
|
application=self.application,
|
|
1213
1222
|
client_id=self._oauth_client_id,
|
|
1214
1223
|
client_secret=self._oauth_client_secret,
|
|
1224
|
+
host=self.host,
|
|
1215
1225
|
authentication_url=self._oauth_authorization_url.format(
|
|
1216
1226
|
host=self.host, port=self.port
|
|
1217
1227
|
),
|
|
@@ -1231,7 +1241,6 @@ class SnowflakeConnection:
|
|
|
1231
1241
|
enable_single_use_refresh_tokens=self._oauth_enable_single_use_refresh_tokens,
|
|
1232
1242
|
)
|
|
1233
1243
|
elif self._authenticator == OAUTH_CLIENT_CREDENTIALS:
|
|
1234
|
-
self._check_oauth_parameters()
|
|
1235
1244
|
if self._role and (self._oauth_scope == ""):
|
|
1236
1245
|
# if role is known then let's inject it into scope
|
|
1237
1246
|
self._oauth_scope = _OAUTH_DEFAULT_SCOPE.format(role=self._role)
|
|
@@ -1249,6 +1258,7 @@ class SnowflakeConnection:
|
|
|
1249
1258
|
else None
|
|
1250
1259
|
),
|
|
1251
1260
|
refresh_token_enabled=self._oauth_enable_refresh_tokens,
|
|
1261
|
+
connection=self,
|
|
1252
1262
|
)
|
|
1253
1263
|
elif self._authenticator == USR_PWD_MFA_AUTHENTICATOR:
|
|
1254
1264
|
self._session_parameters[PARAMETER_CLIENT_REQUEST_MFA_TOKEN] = (
|
|
@@ -1268,6 +1278,15 @@ class SnowflakeConnection:
|
|
|
1268
1278
|
)
|
|
1269
1279
|
elif self._authenticator == PROGRAMMATIC_ACCESS_TOKEN:
|
|
1270
1280
|
self.auth_class = AuthByPAT(self._token)
|
|
1281
|
+
elif self._authenticator == PAT_WITH_EXTERNAL_SESSION:
|
|
1282
|
+
# We don't need to do a POST to /v1/login-request to get session and master tokens at the startup
|
|
1283
|
+
# time. PAT with external (Spark) session ID creates a new session when it encounters the unique
|
|
1284
|
+
# (PAT, external session ID) combination for the first time and then onwards use the (PAT, external
|
|
1285
|
+
# session id) as a key to identify and authenticate the session. So we bypass actual AuthN here.
|
|
1286
|
+
self.auth_class = AuthNoAuth()
|
|
1287
|
+
self._rest.set_pat_and_external_session(
|
|
1288
|
+
self._token, self._external_session_id
|
|
1289
|
+
)
|
|
1271
1290
|
elif self._authenticator == WORKLOAD_IDENTITY_AUTHENTICATOR:
|
|
1272
1291
|
self._check_experimental_authentication_flag()
|
|
1273
1292
|
# Standardize the provider enum.
|
|
@@ -1407,6 +1426,7 @@ class SnowflakeConnection:
|
|
|
1407
1426
|
OAUTH_AUTHENTICATOR,
|
|
1408
1427
|
USR_PWD_MFA_AUTHENTICATOR,
|
|
1409
1428
|
WORKLOAD_IDENTITY_AUTHENTICATOR,
|
|
1429
|
+
PAT_WITH_EXTERNAL_SESSION,
|
|
1410
1430
|
]:
|
|
1411
1431
|
self._authenticator = auth_tmp
|
|
1412
1432
|
|
|
@@ -1422,6 +1442,7 @@ class SnowflakeConnection:
|
|
|
1422
1442
|
NO_AUTH_AUTHENTICATOR,
|
|
1423
1443
|
WORKLOAD_IDENTITY_AUTHENTICATOR,
|
|
1424
1444
|
PROGRAMMATIC_ACCESS_TOKEN,
|
|
1445
|
+
PAT_WITH_EXTERNAL_SESSION,
|
|
1425
1446
|
}
|
|
1426
1447
|
|
|
1427
1448
|
if not (self._master_token and self._session_token):
|
|
@@ -1470,6 +1491,7 @@ class SnowflakeConnection:
|
|
|
1470
1491
|
KEY_PAIR_AUTHENTICATOR,
|
|
1471
1492
|
PROGRAMMATIC_ACCESS_TOKEN,
|
|
1472
1493
|
WORKLOAD_IDENTITY_AUTHENTICATOR,
|
|
1494
|
+
PAT_WITH_EXTERNAL_SESSION,
|
|
1473
1495
|
)
|
|
1474
1496
|
and not self._password
|
|
1475
1497
|
):
|
|
@@ -2236,50 +2258,16 @@ class SnowflakeConnection:
|
|
|
2236
2258
|
},
|
|
2237
2259
|
)
|
|
2238
2260
|
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
},
|
|
2249
|
-
)
|
|
2250
|
-
if self._oauth_client_secret is None:
|
|
2251
|
-
Error.errorhandler_wrapper(
|
|
2252
|
-
self,
|
|
2253
|
-
None,
|
|
2254
|
-
ProgrammingError,
|
|
2255
|
-
{
|
|
2256
|
-
"msg": "Oauth code flow requirement 'client_secret' is empty",
|
|
2257
|
-
"errno": ER_NO_CLIENT_SECRET,
|
|
2258
|
-
},
|
|
2259
|
-
)
|
|
2260
|
-
if (
|
|
2261
|
-
self._oauth_authorization_url
|
|
2262
|
-
and not self._oauth_authorization_url.startswith("https://")
|
|
2263
|
-
):
|
|
2264
|
-
Error.errorhandler_wrapper(
|
|
2265
|
-
self,
|
|
2266
|
-
None,
|
|
2267
|
-
ProgrammingError,
|
|
2268
|
-
{
|
|
2269
|
-
"msg": "OAuth supports only authorization urls that use 'https' scheme",
|
|
2270
|
-
"errno": ER_INVALID_VALUE,
|
|
2271
|
-
},
|
|
2272
|
-
)
|
|
2273
|
-
if self._oauth_redirect_uri and not (
|
|
2274
|
-
self._oauth_redirect_uri.startswith("http://")
|
|
2275
|
-
or self._oauth_redirect_uri.startswith("https://")
|
|
2261
|
+
@staticmethod
|
|
2262
|
+
def _detect_application() -> None | str:
|
|
2263
|
+
if ENV_VAR_PARTNER in os.environ.keys():
|
|
2264
|
+
return os.environ[ENV_VAR_PARTNER]
|
|
2265
|
+
if "streamlit" in sys.modules:
|
|
2266
|
+
return "streamlit"
|
|
2267
|
+
if all(
|
|
2268
|
+
(jpmod in sys.modules)
|
|
2269
|
+
for jpmod in ("ipykernel", "jupyter_core", "jupyter_client")
|
|
2276
2270
|
):
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
ProgrammingError,
|
|
2281
|
-
{
|
|
2282
|
-
"msg": "OAuth supports only authorization urls that use 'http(s)' scheme",
|
|
2283
|
-
"errno": ER_INVALID_VALUE,
|
|
2284
|
-
},
|
|
2285
|
-
)
|
|
2271
|
+
return "jupyter_notebook"
|
|
2272
|
+
if "snowbooks" in sys.modules:
|
|
2273
|
+
return "snowflake_notebook"
|
|
@@ -672,7 +672,10 @@ class SnowflakeCursor:
|
|
|
672
672
|
else:
|
|
673
673
|
# or detect it.
|
|
674
674
|
self._is_file_transfer = get_file_transfer_type(query) is not None
|
|
675
|
-
logger.debug(
|
|
675
|
+
logger.debug(
|
|
676
|
+
"is_file_transfer: %s",
|
|
677
|
+
self._is_file_transfer if self._is_file_transfer is not None else "None",
|
|
678
|
+
)
|
|
676
679
|
|
|
677
680
|
real_timeout = (
|
|
678
681
|
timeout if timeout and timeout > 0 else self._connection.network_timeout
|
|
@@ -1209,6 +1212,7 @@ class SnowflakeCursor:
|
|
|
1209
1212
|
result_chunks,
|
|
1210
1213
|
self._connection.client_fetch_threads
|
|
1211
1214
|
or self._connection.client_prefetch_threads,
|
|
1215
|
+
self._connection.client_fetch_use_mp,
|
|
1212
1216
|
)
|
|
1213
1217
|
self._rownumber = -1
|
|
1214
1218
|
self._result_state = ResultState.VALID
|
|
@@ -1459,7 +1463,7 @@ class SnowflakeCursor:
|
|
|
1459
1463
|
bind_stage = None
|
|
1460
1464
|
if (
|
|
1461
1465
|
bind_size
|
|
1462
|
-
|
|
1466
|
+
>= self.connection._session_parameters[
|
|
1463
1467
|
"CLIENT_STAGE_ARRAY_BINDING_THRESHOLD"
|
|
1464
1468
|
]
|
|
1465
1469
|
> 0
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
from typing import TYPE_CHECKING
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from .connection import SnowflakeConnection
|
|
7
|
+
|
|
8
|
+
import os
|
|
3
9
|
from abc import ABC, abstractmethod
|
|
4
10
|
|
|
11
|
+
from .constants import CMD_TYPE_UPLOAD
|
|
12
|
+
|
|
5
13
|
|
|
6
14
|
class FileOperationParserBase(ABC):
|
|
7
15
|
"""The interface of internal utility functions for file operation parsing."""
|
|
@@ -37,8 +45,8 @@ class StreamDownloaderBase(ABC):
|
|
|
37
45
|
|
|
38
46
|
|
|
39
47
|
class FileOperationParser(FileOperationParserBase):
|
|
40
|
-
def __init__(self, connection):
|
|
41
|
-
|
|
48
|
+
def __init__(self, connection: SnowflakeConnection):
|
|
49
|
+
self._connection = connection
|
|
42
50
|
|
|
43
51
|
def parse_file_operation(
|
|
44
52
|
self,
|
|
@@ -49,7 +57,27 @@ class FileOperationParser(FileOperationParserBase):
|
|
|
49
57
|
options,
|
|
50
58
|
has_source_from_stream=False,
|
|
51
59
|
):
|
|
52
|
-
|
|
60
|
+
"""Parses a file operation by constructing SQL and getting the SQL parsing result from server."""
|
|
61
|
+
options = options or {}
|
|
62
|
+
options_in_sql = " ".join(f"{k}={v}" for k, v in options.items())
|
|
63
|
+
|
|
64
|
+
if command_type == CMD_TYPE_UPLOAD:
|
|
65
|
+
if has_source_from_stream:
|
|
66
|
+
stage_location, unprefixed_local_file_name = os.path.split(
|
|
67
|
+
stage_location
|
|
68
|
+
)
|
|
69
|
+
local_file_name = "file://" + unprefixed_local_file_name
|
|
70
|
+
sql = f"PUT {local_file_name} ? {options_in_sql}"
|
|
71
|
+
params = [stage_location]
|
|
72
|
+
else:
|
|
73
|
+
raise NotImplementedError(f"unsupported command type: {command_type}")
|
|
74
|
+
|
|
75
|
+
with self._connection.cursor() as cursor:
|
|
76
|
+
# Send constructed SQL to server and get back parsing result.
|
|
77
|
+
processed_params = cursor._connection._process_params_qmarks(params, cursor)
|
|
78
|
+
return cursor._execute_helper(
|
|
79
|
+
sql, binding_params=processed_params, is_internal=True
|
|
80
|
+
)
|
|
53
81
|
|
|
54
82
|
|
|
55
83
|
class StreamDownloader(StreamDownloaderBase):
|