From d60a9af0bd5f80bc914a137cd34e5bb883d34694 Mon Sep 17 00:00:00 2001 From: James Bourbeau Date: Wed, 19 Jul 2023 14:09:57 -0500 Subject: [PATCH] Temporarily disable `log_telemetry_imported_packages` (#52) --- dask_snowflake/core.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dask_snowflake/core.py b/dask_snowflake/core.py index 9e8ee3e..c666fda 100644 --- a/dask_snowflake/core.py +++ b/dask_snowflake/core.py @@ -266,6 +266,17 @@ def read_snowflake( arrow_options, ) + # Disable `log_imported_packages_in_telemetry` as a temporary workaround for + # https://github.com/snowflakedb/snowflake-connector-python/issues/1648. + # Also xref https://github.com/coiled/dask-snowflake/issues/51. + if connection_kwargs.get("log_imported_packages_in_telemetry"): + raise ValueError( + "Using `log_imported_packages_in_telemetry=True` when creating a " + "Snowflake connection is not currently supported." + ) + else: + connection_kwargs["log_imported_packages_in_telemetry"] = False + # Some clusters will overwrite the `snowflake.partner` configuration value. # We fetch snowflake batches on the cluster to ensure we capture the # right partner application ID.