snowflake-connector-python 3.12.2__tar.gz → 3.12.4__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.12.2 → snowflake_connector_python-3.12.4}/DESCRIPTION.md +10 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/PKG-INFO +12 -2
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/README.md +5 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/setup.cfg +1 -1
- snowflake_connector_python-3.12.4/src/snowflake/connector/_utils.py +56 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/_auth.py +16 -2
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/azure_storage_client.py +41 -3
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/bind_upload_agent.py +19 -6
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/connection.py +3 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/constants.py +6 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/cursor.py +17 -4
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/network.py +26 -6
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/ocsp_asn1crypto.py +17 -1
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/pandas_tools.py +54 -8
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/secret_detector.py +2 -2
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/util_text.py +9 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/version.py +1 -1
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake_connector_python.egg-info/PKG-INFO +12 -2
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake_connector_python.egg-info/SOURCES.txt +1 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake_connector_python.egg-info/requires.txt +1 -1
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/CONTRIBUTING.md +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/LICENSE.txt +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/MANIFEST.in +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/NOTICE +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/SECURITY.md +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/pyproject.toml +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/setup.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/_query_context_cache.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/_sql_util.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/arrow_context.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/by_plugin.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/default.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/idtoken.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/keypair.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/oauth.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/okta.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/usrpwdmfa.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/auth/webbrowser.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/backoff_policies.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/cache.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/compat.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/config_manager.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/connection_diagnostic.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/converter.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/converter_issue23517.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/converter_null.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/converter_snowsql.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/dbapi.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/description.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/encryption_util.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/errorcode.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/errors.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/feature.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/file_compression_type.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/file_transfer_agent.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/file_util.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/gcs_storage_client.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/gzip_decoder.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/local_storage_client.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/log_configuration.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ArrayConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BinaryConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/BooleanConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowChunkIterator.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowIterator.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/CArrowTableIterator.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DateConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/DecimalConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FixedSizeListConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/FloatConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IColumnConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/IntConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/LICENSE.txt +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/MapConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/ObjectConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Common.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Python/Helpers.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/SnowflakeType.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/StringConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/TimeStampConverter.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/macros.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/Util/time.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_accessors.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_alloc.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_assert.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_builder.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_emitter.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_endian.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_epilogue.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_flatbuffers.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_identifier.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_iov.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_prologue.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_refmap.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_rtconfig.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_types.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/flatcc_verifier.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/flatcc_portable.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/paligned_alloc.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pattributes.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_pop.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pdiagnostic_push.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pendian_detect.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinline.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pinttypes.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/portable_basic.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstatic_assert.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdalign.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pstdint.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/punaligned.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pversion.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc/portable/pwarnings.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/flatcc.c +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.c +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_arrow_iterator.pyx +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.c +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_device.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.c +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/ArrowIterator/nanoarrow_ipc.h +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.cpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/nanoarrow_cpp/Logging/logging.hpp +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/ocsp_snowflake.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/options.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/proxy.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/py.typed +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/result_batch.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/result_set.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/s3_storage_client.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/sf_dirs.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/sfbinaryformat.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/sfdatetime.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/snow_logging.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/sqlstate.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/ssd_internal_keys.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/ssl_wrap_socket.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/storage_client.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/telemetry.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/telemetry_oob.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/test_util.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/time_util.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/tool/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/tool/dump_certs.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/tool/dump_ocsp_response.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/tool/dump_ocsp_response_cache.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/tool/probe_connection.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/url_util.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/LICENSE +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/__version__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/_internal_utils.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/adapters.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/api.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/auth.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/certs.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/compat.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/cookies.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/exceptions.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/help.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/hooks.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/models.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/sessions.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/status_codes.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/structures.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/requests/utils.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/LICENSE.txt +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/_collections.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/_version.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/connection.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/connectionpool.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/_appengine_environ.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/bindings.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/_securetransport/low_level.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/appengine.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/ntlmpool.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/pyopenssl.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/securetransport.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/contrib/socks.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/exceptions.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/fields.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/filepost.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/packages/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/packages/backports/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/packages/backports/makefile.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/packages/backports/weakref_finalize.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/packages/six.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/poolmanager.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/request.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/response.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/__init__.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/connection.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/proxy.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/queue.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/request.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/response.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/retry.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/ssl_.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/ssl_match_hostname.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/ssltransport.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/timeout.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/url.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake/connector/vendored/urllib3/util/wait.py +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake_connector_python.egg-info/dependency_links.txt +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake_connector_python.egg-info/entry_points.txt +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake_connector_python.egg-info/not-zip-safe +0 -0
- {snowflake_connector_python-3.12.2 → snowflake_connector_python-3.12.4}/src/snowflake_connector_python.egg-info/top_level.txt +0 -0
|
@@ -8,6 +8,16 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
|
|
|
8
8
|
|
|
9
9
|
# Release Notes
|
|
10
10
|
|
|
11
|
+
- v3.12.4(December 3,2024)
|
|
12
|
+
- Fixed a bug where multipart uploads to Azure would be missing their MD5 hashes.
|
|
13
|
+
- Fixed a bug where OpenTelemetry header injection would sometimes cause Exceptions to be thrown.
|
|
14
|
+
- Fixed a bug where OCSP checks would throw TypeError and make mainly GCP blob storage unreachable.
|
|
15
|
+
- Bumped pyOpenSSL dependency from >=16.2.0,<25.0.0 to >=22.0.0,<25.0.0.
|
|
16
|
+
|
|
17
|
+
- v3.12.3(October 25,2024)
|
|
18
|
+
- Improved the error message for SSL-related issues to provide clearer guidance when an SSL error occurs.
|
|
19
|
+
- Improved error message for SQL execution cancellations caused by timeout.
|
|
20
|
+
|
|
11
21
|
- v3.12.2(September 11,2024)
|
|
12
22
|
- Improved error handling for asynchronous queries, providing more detailed and informative error messages when an async query fails.
|
|
13
23
|
- Improved inference of top-level domains for accounts specifying a region in China, now defaulting to snowflakecomputing.cn.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: snowflake-connector-python
|
|
3
|
-
Version: 3.12.
|
|
3
|
+
Version: 3.12.4
|
|
4
4
|
Summary: Snowflake Connector for Python
|
|
5
5
|
Home-page: https://www.snowflake.com/
|
|
6
6
|
Author: Snowflake, Inc
|
|
@@ -41,7 +41,7 @@ License-File: NOTICE
|
|
|
41
41
|
Requires-Dist: asn1crypto<2.0.0,>0.24.0
|
|
42
42
|
Requires-Dist: cffi<2.0.0,>=1.9
|
|
43
43
|
Requires-Dist: cryptography>=3.1.0
|
|
44
|
-
Requires-Dist: pyOpenSSL<25.0.0,>=
|
|
44
|
+
Requires-Dist: pyOpenSSL<25.0.0,>=22.0.0
|
|
45
45
|
Requires-Dist: pyjwt<3.0.0
|
|
46
46
|
Requires-Dist: pytz
|
|
47
47
|
Requires-Dist: requests<3.0.0
|
|
@@ -85,6 +85,16 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
|
|
|
85
85
|
|
|
86
86
|
# Release Notes
|
|
87
87
|
|
|
88
|
+
- v3.12.4(December 3,2024)
|
|
89
|
+
- Fixed a bug where multipart uploads to Azure would be missing their MD5 hashes.
|
|
90
|
+
- Fixed a bug where OpenTelemetry header injection would sometimes cause Exceptions to be thrown.
|
|
91
|
+
- Fixed a bug where OCSP checks would throw TypeError and make mainly GCP blob storage unreachable.
|
|
92
|
+
- Bumped pyOpenSSL dependency from >=16.2.0,<25.0.0 to >=22.0.0,<25.0.0.
|
|
93
|
+
|
|
94
|
+
- v3.12.3(October 25,2024)
|
|
95
|
+
- Improved the error message for SSL-related issues to provide clearer guidance when an SSL error occurs.
|
|
96
|
+
- Improved error message for SQL execution cancellations caused by timeout.
|
|
97
|
+
|
|
88
98
|
- v3.12.2(September 11,2024)
|
|
89
99
|
- Improved error handling for asynchronous queries, providing more detailed and informative error messages when an async query fails.
|
|
90
100
|
- Improved inference of top-level domains for accounts specifying a region in China, now defaulting to snowflakecomputing.cn.
|
|
@@ -81,3 +81,8 @@ conn = snowflake.connector.connect(
|
|
|
81
81
|
)
|
|
82
82
|
conn.telemetry_enabled = False
|
|
83
83
|
```
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
## NOTE
|
|
87
|
+
|
|
88
|
+
This library currently does not support GCP regional endpoints. Please ensure that any workloads using through this library do not require support for regional endpoints on GCP. If you have questions about this, please contact [Snowflake Support](https://community.snowflake.com/s/article/How-To-Submit-a-Support-Case-in-Snowflake-Lodge).
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Copyright (c) 2012-2023 Snowflake Computing Inc. All rights reserved.
|
|
3
|
+
#
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import string
|
|
8
|
+
from enum import Enum
|
|
9
|
+
from random import choice
|
|
10
|
+
from threading import Timer
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class TempObjectType(Enum):
|
|
14
|
+
TABLE = "TABLE"
|
|
15
|
+
VIEW = "VIEW"
|
|
16
|
+
STAGE = "STAGE"
|
|
17
|
+
FUNCTION = "FUNCTION"
|
|
18
|
+
FILE_FORMAT = "FILE_FORMAT"
|
|
19
|
+
QUERY_TAG = "QUERY_TAG"
|
|
20
|
+
COLUMN = "COLUMN"
|
|
21
|
+
PROCEDURE = "PROCEDURE"
|
|
22
|
+
TABLE_FUNCTION = "TABLE_FUNCTION"
|
|
23
|
+
DYNAMIC_TABLE = "DYNAMIC_TABLE"
|
|
24
|
+
AGGREGATE_FUNCTION = "AGGREGATE_FUNCTION"
|
|
25
|
+
CTE = "CTE"
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
TEMP_OBJECT_NAME_PREFIX = "SNOWPARK_TEMP_"
|
|
29
|
+
ALPHANUMERIC = string.digits + string.ascii_lowercase
|
|
30
|
+
TEMPORARY_STRING = "TEMP"
|
|
31
|
+
SCOPED_TEMPORARY_STRING = "SCOPED TEMPORARY"
|
|
32
|
+
_PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING = (
|
|
33
|
+
"PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS"
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def generate_random_alphanumeric(length: int = 10) -> str:
|
|
38
|
+
return "".join(choice(ALPHANUMERIC) for _ in range(length))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def random_name_for_temp_object(object_type: TempObjectType) -> str:
|
|
42
|
+
return f"{TEMP_OBJECT_NAME_PREFIX}{object_type.value}_{generate_random_alphanumeric().upper()}"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def get_temp_type_for_object(use_scoped_temp_objects: bool) -> str:
|
|
46
|
+
return SCOPED_TEMPORARY_STRING if use_scoped_temp_objects else TEMPORARY_STRING
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class _TrackedQueryCancellationTimer(Timer):
|
|
50
|
+
def __init__(self, interval, function, args=None, kwargs=None):
|
|
51
|
+
super().__init__(interval, function, args, kwargs)
|
|
52
|
+
self.executed = False
|
|
53
|
+
|
|
54
|
+
def run(self):
|
|
55
|
+
super().run()
|
|
56
|
+
self.executed = True
|
|
@@ -112,6 +112,18 @@ KEYRING_DRIVER_NAME = "SNOWFLAKE-PYTHON-DRIVER"
|
|
|
112
112
|
ID_TOKEN = "ID_TOKEN"
|
|
113
113
|
MFA_TOKEN = "MFATOKEN"
|
|
114
114
|
|
|
115
|
+
AUTHENTICATION_REQUEST_KEY_WHITELIST = {
|
|
116
|
+
"ACCOUNT_NAME",
|
|
117
|
+
"AUTHENTICATOR",
|
|
118
|
+
"CLIENT_APP_ID",
|
|
119
|
+
"CLIENT_APP_VERSION",
|
|
120
|
+
"CLIENT_ENVIRONMENT",
|
|
121
|
+
"EXT_AUTHN_DUO_METHOD",
|
|
122
|
+
"LOGIN_NAME",
|
|
123
|
+
"SESSION_PARAMETERS",
|
|
124
|
+
"SVN_REVISION",
|
|
125
|
+
}
|
|
126
|
+
|
|
115
127
|
|
|
116
128
|
class Auth:
|
|
117
129
|
"""Snowflake Authenticator."""
|
|
@@ -205,7 +217,6 @@ class Auth:
|
|
|
205
217
|
|
|
206
218
|
body = copy.deepcopy(body_template)
|
|
207
219
|
# updating request body
|
|
208
|
-
logger.debug("assertion content: %s", auth_instance.assertion_content)
|
|
209
220
|
auth_instance.update_body(body)
|
|
210
221
|
|
|
211
222
|
logger.debug(
|
|
@@ -243,7 +254,10 @@ class Auth:
|
|
|
243
254
|
|
|
244
255
|
logger.debug(
|
|
245
256
|
"body['data']: %s",
|
|
246
|
-
{
|
|
257
|
+
{
|
|
258
|
+
k: v if k in AUTHENTICATION_REQUEST_KEY_WHITELIST else "******"
|
|
259
|
+
for (k, v) in body["data"].items()
|
|
260
|
+
},
|
|
247
261
|
)
|
|
248
262
|
|
|
249
263
|
try:
|
|
@@ -4,11 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
from __future__ import annotations
|
|
6
6
|
|
|
7
|
+
import base64
|
|
7
8
|
import json
|
|
8
9
|
import os
|
|
9
10
|
import xml.etree.ElementTree as ET
|
|
10
11
|
from datetime import datetime, timezone
|
|
11
|
-
from logging import getLogger
|
|
12
|
+
from logging import Filter, getLogger
|
|
12
13
|
from random import choice
|
|
13
14
|
from string import hexdigits
|
|
14
15
|
from typing import TYPE_CHECKING, Any, NamedTuple
|
|
@@ -17,6 +18,7 @@ from .compat import quote
|
|
|
17
18
|
from .constants import FileHeader, ResultStatus
|
|
18
19
|
from .encryption_util import EncryptionMetadata
|
|
19
20
|
from .storage_client import SnowflakeStorageClient
|
|
21
|
+
from .util_text import get_md5
|
|
20
22
|
from .vendored import requests
|
|
21
23
|
|
|
22
24
|
if TYPE_CHECKING: # pragma: no cover
|
|
@@ -39,6 +41,22 @@ ENCRYPTION_DATA = "x-ms-meta-encryptiondata"
|
|
|
39
41
|
MATDESC = "x-ms-meta-matdesc"
|
|
40
42
|
|
|
41
43
|
|
|
44
|
+
class AzureCredentialFilter(Filter):
|
|
45
|
+
LEAKY_FMT = '%s://%s:%s "%s %s %s" %s %s'
|
|
46
|
+
|
|
47
|
+
def filter(self, record):
|
|
48
|
+
if record.msg == AzureCredentialFilter.LEAKY_FMT and len(record.args) == 8:
|
|
49
|
+
record.args = (
|
|
50
|
+
record.args[:4] + (record.args[4].split("?")[0],) + record.args[5:]
|
|
51
|
+
)
|
|
52
|
+
return True
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
getLogger("snowflake.connector.vendored.urllib3.connectionpool").addFilter(
|
|
56
|
+
AzureCredentialFilter()
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
42
60
|
class SnowflakeAzureRestClient(SnowflakeStorageClient):
|
|
43
61
|
def __init__(
|
|
44
62
|
self,
|
|
@@ -133,7 +151,7 @@ class SnowflakeAzureRestClient(SnowflakeStorageClient):
|
|
|
133
151
|
)
|
|
134
152
|
)
|
|
135
153
|
return FileHeader(
|
|
136
|
-
digest=r.headers.get(
|
|
154
|
+
digest=r.headers.get(SFCDIGEST),
|
|
137
155
|
content_length=int(r.headers.get("Content-Length")),
|
|
138
156
|
encryption_metadata=encryption_metadata,
|
|
139
157
|
)
|
|
@@ -220,7 +238,27 @@ class SnowflakeAzureRestClient(SnowflakeStorageClient):
|
|
|
220
238
|
part = ET.Element("Latest")
|
|
221
239
|
part.text = block_id
|
|
222
240
|
root.append(part)
|
|
223
|
-
|
|
241
|
+
# SNOW-1778088: We need to calculate the MD5 sum of this file for Azure Blob storage
|
|
242
|
+
new_stream = not bool(self.meta.src_stream or self.meta.intermediate_stream)
|
|
243
|
+
fd = (
|
|
244
|
+
self.meta.src_stream
|
|
245
|
+
or self.meta.intermediate_stream
|
|
246
|
+
or open(self.meta.real_src_file_name, "rb")
|
|
247
|
+
)
|
|
248
|
+
try:
|
|
249
|
+
if not new_stream:
|
|
250
|
+
# Reset position in file
|
|
251
|
+
fd.seek(0)
|
|
252
|
+
file_content = fd.read()
|
|
253
|
+
finally:
|
|
254
|
+
if new_stream:
|
|
255
|
+
fd.close()
|
|
256
|
+
headers = {
|
|
257
|
+
"x-ms-blob-content-encoding": "utf-8",
|
|
258
|
+
"x-ms-blob-content-md5": base64.b64encode(get_md5(file_content)).decode(
|
|
259
|
+
"utf-8"
|
|
260
|
+
),
|
|
261
|
+
}
|
|
224
262
|
azure_metadata = self._prepare_file_metadata()
|
|
225
263
|
headers.update(azure_metadata)
|
|
226
264
|
retry_id = "COMPLETE"
|
|
@@ -10,6 +10,10 @@ from io import BytesIO
|
|
|
10
10
|
from logging import getLogger
|
|
11
11
|
from typing import TYPE_CHECKING
|
|
12
12
|
|
|
13
|
+
from ._utils import (
|
|
14
|
+
_PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING,
|
|
15
|
+
get_temp_type_for_object,
|
|
16
|
+
)
|
|
13
17
|
from .errors import BindUploadError, Error
|
|
14
18
|
|
|
15
19
|
if TYPE_CHECKING: # pragma: no cover
|
|
@@ -19,11 +23,6 @@ logger = getLogger(__name__)
|
|
|
19
23
|
|
|
20
24
|
|
|
21
25
|
class BindUploadAgent:
|
|
22
|
-
_STAGE_NAME = "SYSTEMBIND"
|
|
23
|
-
_CREATE_STAGE_STMT = (
|
|
24
|
-
f"create or replace temporary stage {_STAGE_NAME} "
|
|
25
|
-
"file_format=(type=csv field_optionally_enclosed_by='\"')"
|
|
26
|
-
)
|
|
27
26
|
|
|
28
27
|
def __init__(
|
|
29
28
|
self,
|
|
@@ -38,13 +37,27 @@ class BindUploadAgent:
|
|
|
38
37
|
rows: Rows of binding parameters in CSV format.
|
|
39
38
|
stream_buffer_size: Size of each file, default to 10MB.
|
|
40
39
|
"""
|
|
40
|
+
self._use_scoped_temp_object = (
|
|
41
|
+
cursor.connection._session_parameters.get(
|
|
42
|
+
_PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING, False
|
|
43
|
+
)
|
|
44
|
+
if cursor.connection._session_parameters
|
|
45
|
+
else False
|
|
46
|
+
)
|
|
47
|
+
self._STAGE_NAME = (
|
|
48
|
+
"SNOWPARK_TEMP_STAGE_BIND" if self._use_scoped_temp_object else "SYSTEMBIND"
|
|
49
|
+
)
|
|
41
50
|
self.cursor = cursor
|
|
42
51
|
self.rows = rows
|
|
43
52
|
self._stream_buffer_size = stream_buffer_size
|
|
44
53
|
self.stage_path = f"@{self._STAGE_NAME}/{uuid.uuid4().hex}"
|
|
45
54
|
|
|
46
55
|
def _create_stage(self) -> None:
|
|
47
|
-
|
|
56
|
+
create_stage_sql = (
|
|
57
|
+
f"create or replace {get_temp_type_for_object(self._use_scoped_temp_object)} stage {self._STAGE_NAME} "
|
|
58
|
+
"file_format=(type=csv field_optionally_enclosed_by='\"')"
|
|
59
|
+
)
|
|
60
|
+
self.cursor.execute(create_stage_sql)
|
|
48
61
|
|
|
49
62
|
def upload(self) -> None:
|
|
50
63
|
try:
|
|
@@ -52,6 +52,7 @@ from .compat import IS_LINUX, IS_WINDOWS, quote, urlencode
|
|
|
52
52
|
from .config_manager import CONFIG_MANAGER, _get_default_connection_params
|
|
53
53
|
from .connection_diagnostic import ConnectionDiagnostic
|
|
54
54
|
from .constants import (
|
|
55
|
+
_CONNECTIVITY_ERR_MSG,
|
|
55
56
|
_DOMAIN_NAME_MAP,
|
|
56
57
|
ENV_VAR_PARTNER,
|
|
57
58
|
PARAMETER_AUTOCOMMIT,
|
|
@@ -1455,6 +1456,8 @@ class SnowflakeConnection:
|
|
|
1455
1456
|
)
|
|
1456
1457
|
except OperationalError as auth_op:
|
|
1457
1458
|
if auth_op.errno == ER_FAILED_TO_CONNECT_TO_DB:
|
|
1459
|
+
if _CONNECTIVITY_ERR_MSG in e.msg:
|
|
1460
|
+
auth_op.msg += f"\n{_CONNECTIVITY_ERR_MSG}"
|
|
1458
1461
|
raise auth_op from e
|
|
1459
1462
|
logger.debug("Continuing authenticator specific timeout handling")
|
|
1460
1463
|
continue
|
|
@@ -428,3 +428,9 @@ ENV_VAR_TEST_MODE = "SNOWFLAKE_TEST_MODE"
|
|
|
428
428
|
|
|
429
429
|
|
|
430
430
|
_DOMAIN_NAME_MAP = {_DEFAULT_HOSTNAME_TLD: "GLOBAL", _CHINA_HOSTNAME_TLD: "CHINA"}
|
|
431
|
+
|
|
432
|
+
_CONNECTIVITY_ERR_MSG = (
|
|
433
|
+
"Verify that the hostnames and port numbers in SYSTEM$ALLOWLIST are added to your firewall's allowed list."
|
|
434
|
+
"\nTo further troubleshoot your connection you may reference the following article: "
|
|
435
|
+
"https://docs.snowflake.com/en/user-guide/client-connectivity-troubleshooting/overview."
|
|
436
|
+
)
|
|
@@ -16,7 +16,7 @@ import uuid
|
|
|
16
16
|
import warnings
|
|
17
17
|
from enum import Enum
|
|
18
18
|
from logging import getLogger
|
|
19
|
-
from threading import Lock
|
|
19
|
+
from threading import Lock
|
|
20
20
|
from types import TracebackType
|
|
21
21
|
from typing import (
|
|
22
22
|
IO,
|
|
@@ -39,6 +39,7 @@ from snowflake.connector.result_set import ResultSet
|
|
|
39
39
|
|
|
40
40
|
from . import compat
|
|
41
41
|
from ._sql_util import get_file_transfer_type
|
|
42
|
+
from ._utils import _TrackedQueryCancellationTimer
|
|
42
43
|
from .bind_upload_agent import BindUploadAgent, BindUploadError
|
|
43
44
|
from .constants import (
|
|
44
45
|
FIELD_NAME_TO_ID,
|
|
@@ -392,7 +393,9 @@ class SnowflakeCursor:
|
|
|
392
393
|
self.messages: list[
|
|
393
394
|
tuple[type[Error] | type[Exception], dict[str, str | bool]]
|
|
394
395
|
] = []
|
|
395
|
-
self._timebomb:
|
|
396
|
+
self._timebomb: _TrackedQueryCancellationTimer | None = (
|
|
397
|
+
None # must be here for abort_exit method
|
|
398
|
+
)
|
|
396
399
|
self._description: list[ResultMetadataV2] | None = None
|
|
397
400
|
self._sfqid: str | None = None
|
|
398
401
|
self._sqlstate = None
|
|
@@ -654,7 +657,9 @@ class SnowflakeCursor:
|
|
|
654
657
|
)
|
|
655
658
|
|
|
656
659
|
if real_timeout is not None:
|
|
657
|
-
self._timebomb =
|
|
660
|
+
self._timebomb = _TrackedQueryCancellationTimer(
|
|
661
|
+
real_timeout, self.__cancel_query, [query]
|
|
662
|
+
)
|
|
658
663
|
self._timebomb.start()
|
|
659
664
|
logger.debug("started timebomb in %ss", real_timeout)
|
|
660
665
|
else:
|
|
@@ -1071,6 +1076,11 @@ class SnowflakeCursor:
|
|
|
1071
1076
|
logger.debug(ret)
|
|
1072
1077
|
err = ret["message"]
|
|
1073
1078
|
code = ret.get("code", -1)
|
|
1079
|
+
if self._timebomb and self._timebomb.executed:
|
|
1080
|
+
err = (
|
|
1081
|
+
f"SQL execution was cancelled by the client due to a timeout. "
|
|
1082
|
+
f"Error message received from the server: {err}"
|
|
1083
|
+
)
|
|
1074
1084
|
if "data" in ret:
|
|
1075
1085
|
err += ret["data"].get("errorMessage", "")
|
|
1076
1086
|
errvalue = {
|
|
@@ -1238,6 +1248,7 @@ class SnowflakeCursor:
|
|
|
1238
1248
|
)
|
|
1239
1249
|
|
|
1240
1250
|
def query_result(self, qid: str) -> SnowflakeCursor:
|
|
1251
|
+
"""Query the result of a previously executed query."""
|
|
1241
1252
|
url = f"/queries/{qid}/result"
|
|
1242
1253
|
ret = self._connection.rest.request(url=url, method="get")
|
|
1243
1254
|
self._sfqid = (
|
|
@@ -1631,7 +1642,9 @@ class SnowflakeCursor:
|
|
|
1631
1642
|
self.close()
|
|
1632
1643
|
|
|
1633
1644
|
def get_results_from_sfqid(self, sfqid: str) -> None:
|
|
1634
|
-
"""Gets the results from previously ran query.
|
|
1645
|
+
"""Gets the results from previously ran query. This methods differs from ``SnowflakeCursor.query_result``
|
|
1646
|
+
in that it monitors the ``sfqid`` until it is no longer running, and then retrieves the results.
|
|
1647
|
+
"""
|
|
1635
1648
|
|
|
1636
1649
|
def wait_until_ready() -> None:
|
|
1637
1650
|
"""Makes sure query has finished executing and once it has retrieves results."""
|
|
@@ -46,6 +46,7 @@ from .compat import (
|
|
|
46
46
|
urlparse,
|
|
47
47
|
)
|
|
48
48
|
from .constants import (
|
|
49
|
+
_CONNECTIVITY_ERR_MSG,
|
|
49
50
|
_SNOWFLAKE_HOST_SUFFIX_REGEX,
|
|
50
51
|
HTTP_HEADER_ACCEPT,
|
|
51
52
|
HTTP_HEADER_CONTENT_TYPE,
|
|
@@ -480,11 +481,19 @@ class SnowflakeRestful:
|
|
|
480
481
|
HTTP_HEADER_USER_AGENT: PYTHON_CONNECTOR_USER_AGENT,
|
|
481
482
|
}
|
|
482
483
|
try:
|
|
483
|
-
|
|
484
|
+
# SNOW-1763555: inject OpenTelemetry headers if available specifically in WC3 format
|
|
485
|
+
# into our request headers in case tracing is enabled. This should make sure that
|
|
486
|
+
# our requests are accounted for properly if OpenTelemetry is used by users.
|
|
487
|
+
from opentelemetry.trace.propagation.tracecontext import (
|
|
488
|
+
TraceContextTextMapPropagator,
|
|
489
|
+
)
|
|
484
490
|
|
|
485
|
-
inject(headers)
|
|
486
|
-
except
|
|
487
|
-
logger.debug(
|
|
491
|
+
TraceContextTextMapPropagator().inject(headers)
|
|
492
|
+
except Exception:
|
|
493
|
+
logger.debug(
|
|
494
|
+
"Opentelemtry otel injection failed",
|
|
495
|
+
exc_info=True,
|
|
496
|
+
)
|
|
488
497
|
if self._connection.service_name:
|
|
489
498
|
headers[HTTP_HEADER_SERVICE_NAME] = self._connection.service_name
|
|
490
499
|
if method == "post":
|
|
@@ -1134,8 +1143,19 @@ class SnowflakeRestful:
|
|
|
1134
1143
|
finally:
|
|
1135
1144
|
raw_ret.close() # ensure response is closed
|
|
1136
1145
|
except SSLError as se:
|
|
1137
|
-
|
|
1138
|
-
|
|
1146
|
+
msg = f"Hit non-retryable SSL error, {str(se)}.\n{_CONNECTIVITY_ERR_MSG}"
|
|
1147
|
+
logger.debug(msg)
|
|
1148
|
+
# the following code is for backward compatibility with old versions of python connector which calls
|
|
1149
|
+
# self._handle_unknown_error to process SSLError
|
|
1150
|
+
Error.errorhandler_wrapper(
|
|
1151
|
+
self._connection,
|
|
1152
|
+
None,
|
|
1153
|
+
OperationalError,
|
|
1154
|
+
{
|
|
1155
|
+
"msg": msg,
|
|
1156
|
+
"errno": ER_FAILED_TO_REQUEST,
|
|
1157
|
+
},
|
|
1158
|
+
)
|
|
1139
1159
|
except (
|
|
1140
1160
|
BadStatusLine,
|
|
1141
1161
|
ConnectionError,
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
|
|
8
|
+
import typing
|
|
8
9
|
from base64 import b64decode, b64encode
|
|
9
10
|
from collections import OrderedDict
|
|
10
11
|
from datetime import datetime, timezone
|
|
@@ -28,6 +29,9 @@ from cryptography.exceptions import InvalidSignature
|
|
|
28
29
|
from cryptography.hazmat.backends import default_backend
|
|
29
30
|
from cryptography.hazmat.primitives import hashes, serialization
|
|
30
31
|
from cryptography.hazmat.primitives.asymmetric import padding, utils
|
|
32
|
+
from cryptography.hazmat.primitives.asymmetric.dsa import DSAPublicKey
|
|
33
|
+
from cryptography.hazmat.primitives.asymmetric.ec import ECDSA, EllipticCurvePublicKey
|
|
34
|
+
from cryptography.hazmat.primitives.asymmetric.rsa import RSAPublicKey
|
|
31
35
|
from OpenSSL.SSL import Connection
|
|
32
36
|
|
|
33
37
|
from snowflake.connector.errorcode import (
|
|
@@ -368,9 +372,21 @@ class SnowflakeOCSPAsn1Crypto(SnowflakeOCSP):
|
|
|
368
372
|
hasher = hashes.Hash(chosen_hash, backend)
|
|
369
373
|
hasher.update(data.dump())
|
|
370
374
|
digest = hasher.finalize()
|
|
375
|
+
additional_kwargs: dict[str, typing.Any] = dict()
|
|
376
|
+
if isinstance(public_key, RSAPublicKey):
|
|
377
|
+
additional_kwargs["padding"] = padding.PKCS1v15()
|
|
378
|
+
additional_kwargs["algorithm"] = utils.Prehashed(chosen_hash)
|
|
379
|
+
elif isinstance(public_key, DSAPublicKey):
|
|
380
|
+
additional_kwargs["algorithm"] = utils.Prehashed(chosen_hash)
|
|
381
|
+
elif isinstance(public_key, EllipticCurvePublicKey):
|
|
382
|
+
additional_kwargs["signature_algorithm"] = ECDSA(
|
|
383
|
+
utils.Prehashed(chosen_hash)
|
|
384
|
+
)
|
|
371
385
|
try:
|
|
372
386
|
public_key.verify(
|
|
373
|
-
signature,
|
|
387
|
+
signature,
|
|
388
|
+
digest,
|
|
389
|
+
**additional_kwargs,
|
|
374
390
|
)
|
|
375
391
|
except InvalidSignature:
|
|
376
392
|
raise RevocationCheckError(msg="Failed to verify the signature")
|
|
@@ -26,6 +26,12 @@ from snowflake.connector.options import pandas
|
|
|
26
26
|
from snowflake.connector.telemetry import TelemetryData, TelemetryField
|
|
27
27
|
from snowflake.connector.util_text import random_string
|
|
28
28
|
|
|
29
|
+
from ._utils import (
|
|
30
|
+
_PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING,
|
|
31
|
+
TempObjectType,
|
|
32
|
+
get_temp_type_for_object,
|
|
33
|
+
random_name_for_temp_object,
|
|
34
|
+
)
|
|
29
35
|
from .cursor import SnowflakeCursor
|
|
30
36
|
|
|
31
37
|
if TYPE_CHECKING: # pragma: no cover
|
|
@@ -77,8 +83,9 @@ def _do_create_temp_stage(
|
|
|
77
83
|
compression: str,
|
|
78
84
|
auto_create_table: bool,
|
|
79
85
|
overwrite: bool,
|
|
86
|
+
use_scoped_temp_object: bool,
|
|
80
87
|
) -> None:
|
|
81
|
-
create_stage_sql = f"CREATE
|
|
88
|
+
create_stage_sql = f"CREATE {get_temp_type_for_object(use_scoped_temp_object)} STAGE /* Python:snowflake.connector.pandas_tools.write_pandas() */ {stage_location} FILE_FORMAT=(TYPE=PARQUET COMPRESSION={compression}{' BINARY_AS_TEXT=FALSE' if auto_create_table or overwrite else ''})"
|
|
82
89
|
logger.debug(f"creating stage with '{create_stage_sql}'")
|
|
83
90
|
cursor.execute(create_stage_sql, _is_internal=True).fetchall()
|
|
84
91
|
|
|
@@ -91,8 +98,13 @@ def _create_temp_stage(
|
|
|
91
98
|
compression: str,
|
|
92
99
|
auto_create_table: bool,
|
|
93
100
|
overwrite: bool,
|
|
101
|
+
use_scoped_temp_object: bool = False,
|
|
94
102
|
) -> str:
|
|
95
|
-
stage_name =
|
|
103
|
+
stage_name = (
|
|
104
|
+
random_name_for_temp_object(TempObjectType.STAGE)
|
|
105
|
+
if use_scoped_temp_object
|
|
106
|
+
else random_string()
|
|
107
|
+
)
|
|
96
108
|
stage_location = build_location_helper(
|
|
97
109
|
database=database,
|
|
98
110
|
schema=schema,
|
|
@@ -101,7 +113,12 @@ def _create_temp_stage(
|
|
|
101
113
|
)
|
|
102
114
|
try:
|
|
103
115
|
_do_create_temp_stage(
|
|
104
|
-
cursor,
|
|
116
|
+
cursor,
|
|
117
|
+
stage_location,
|
|
118
|
+
compression,
|
|
119
|
+
auto_create_table,
|
|
120
|
+
overwrite,
|
|
121
|
+
use_scoped_temp_object,
|
|
105
122
|
)
|
|
106
123
|
except ProgrammingError as e:
|
|
107
124
|
# User may not have the privilege to create stage on the target schema, so fall back to use current schema as
|
|
@@ -111,7 +128,12 @@ def _create_temp_stage(
|
|
|
111
128
|
)
|
|
112
129
|
stage_location = stage_name
|
|
113
130
|
_do_create_temp_stage(
|
|
114
|
-
cursor,
|
|
131
|
+
cursor,
|
|
132
|
+
stage_location,
|
|
133
|
+
compression,
|
|
134
|
+
auto_create_table,
|
|
135
|
+
overwrite,
|
|
136
|
+
use_scoped_temp_object,
|
|
115
137
|
)
|
|
116
138
|
|
|
117
139
|
return stage_location
|
|
@@ -122,9 +144,10 @@ def _do_create_temp_file_format(
|
|
|
122
144
|
file_format_location: str,
|
|
123
145
|
compression: str,
|
|
124
146
|
sql_use_logical_type: str,
|
|
147
|
+
use_scoped_temp_object: bool,
|
|
125
148
|
) -> None:
|
|
126
149
|
file_format_sql = (
|
|
127
|
-
f"CREATE
|
|
150
|
+
f"CREATE {get_temp_type_for_object(use_scoped_temp_object)} FILE FORMAT {file_format_location} "
|
|
128
151
|
f"/* Python:snowflake.connector.pandas_tools.write_pandas() */ "
|
|
129
152
|
f"TYPE=PARQUET COMPRESSION={compression}{sql_use_logical_type}"
|
|
130
153
|
)
|
|
@@ -139,8 +162,13 @@ def _create_temp_file_format(
|
|
|
139
162
|
quote_identifiers: bool,
|
|
140
163
|
compression: str,
|
|
141
164
|
sql_use_logical_type: str,
|
|
165
|
+
use_scoped_temp_object: bool = False,
|
|
142
166
|
) -> str:
|
|
143
|
-
file_format_name =
|
|
167
|
+
file_format_name = (
|
|
168
|
+
random_name_for_temp_object(TempObjectType.FILE_FORMAT)
|
|
169
|
+
if use_scoped_temp_object
|
|
170
|
+
else random_string()
|
|
171
|
+
)
|
|
144
172
|
file_format_location = build_location_helper(
|
|
145
173
|
database=database,
|
|
146
174
|
schema=schema,
|
|
@@ -149,7 +177,11 @@ def _create_temp_file_format(
|
|
|
149
177
|
)
|
|
150
178
|
try:
|
|
151
179
|
_do_create_temp_file_format(
|
|
152
|
-
cursor,
|
|
180
|
+
cursor,
|
|
181
|
+
file_format_location,
|
|
182
|
+
compression,
|
|
183
|
+
sql_use_logical_type,
|
|
184
|
+
use_scoped_temp_object,
|
|
153
185
|
)
|
|
154
186
|
except ProgrammingError as e:
|
|
155
187
|
# User may not have the privilege to create file format on the target schema, so fall back to use current schema
|
|
@@ -159,7 +191,11 @@ def _create_temp_file_format(
|
|
|
159
191
|
)
|
|
160
192
|
file_format_location = file_format_name
|
|
161
193
|
_do_create_temp_file_format(
|
|
162
|
-
cursor,
|
|
194
|
+
cursor,
|
|
195
|
+
file_format_location,
|
|
196
|
+
compression,
|
|
197
|
+
sql_use_logical_type,
|
|
198
|
+
use_scoped_temp_object,
|
|
163
199
|
)
|
|
164
200
|
|
|
165
201
|
return file_format_location
|
|
@@ -263,6 +299,14 @@ def write_pandas(
|
|
|
263
299
|
f"Invalid compression '{compression}', only acceptable values are: {compression_map.keys()}"
|
|
264
300
|
)
|
|
265
301
|
|
|
302
|
+
_use_scoped_temp_object = (
|
|
303
|
+
conn._session_parameters.get(
|
|
304
|
+
_PYTHON_SNOWPARK_USE_SCOPED_TEMP_OBJECTS_STRING, False
|
|
305
|
+
)
|
|
306
|
+
if conn._session_parameters
|
|
307
|
+
else False
|
|
308
|
+
)
|
|
309
|
+
|
|
266
310
|
if create_temp_table:
|
|
267
311
|
warnings.warn(
|
|
268
312
|
"create_temp_table is deprecated, we still respect this parameter when it is True but "
|
|
@@ -324,6 +368,7 @@ def write_pandas(
|
|
|
324
368
|
compression,
|
|
325
369
|
auto_create_table,
|
|
326
370
|
overwrite,
|
|
371
|
+
_use_scoped_temp_object,
|
|
327
372
|
)
|
|
328
373
|
|
|
329
374
|
with TemporaryDirectory() as tmp_folder:
|
|
@@ -370,6 +415,7 @@ def write_pandas(
|
|
|
370
415
|
quote_identifiers,
|
|
371
416
|
compression_map[compression],
|
|
372
417
|
sql_use_logical_type,
|
|
418
|
+
_use_scoped_temp_object,
|
|
373
419
|
)
|
|
374
420
|
infer_schema_sql = f"SELECT COLUMN_NAME, TYPE FROM table(infer_schema(location=>'@{stage_location}', file_format=>'{file_format_location}'))"
|
|
375
421
|
logger.debug(f"inferring schema with '{infer_schema_sql}'")
|
|
@@ -33,14 +33,14 @@ class SecretDetector(logging.Formatter):
|
|
|
33
33
|
flags=re.IGNORECASE,
|
|
34
34
|
)
|
|
35
35
|
PRIVATE_KEY_PATTERN = re.compile(
|
|
36
|
-
r"
|
|
36
|
+
r"-{3,}BEGIN [A-Z ]*PRIVATE KEY-{3,}\n([\s\S]*?)\n-{3,}END [A-Z ]*PRIVATE KEY-{3,}",
|
|
37
37
|
flags=re.MULTILINE | re.IGNORECASE,
|
|
38
38
|
)
|
|
39
39
|
PRIVATE_KEY_DATA_PATTERN = re.compile(
|
|
40
40
|
r'"privateKeyData": "([a-z0-9/+=\\n]{10,})"', flags=re.MULTILINE | re.IGNORECASE
|
|
41
41
|
)
|
|
42
42
|
CONNECTION_TOKEN_PATTERN = re.compile(
|
|
43
|
-
r"(token|assertion content)" r"([\'\"\s:=]+)" r"([a-z0-9=/_
|
|
43
|
+
r"(token|assertion content)" r"([\'\"\s:=]+)" r"([a-z0-9=/_\-\+\.]{8,})",
|
|
44
44
|
flags=re.IGNORECASE,
|
|
45
45
|
)
|
|
46
46
|
|