diff --git a/pyproject.toml b/pyproject.toml index 83432b4..121b9cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ds-platform-utils" -version = "0.4.1" +version = "0.4.2" description = "Utility library for Pattern Data Science." readme = "README.md" authors = [ diff --git a/src/ds_platform_utils/metaflow/snowflake_connection.py b/src/ds_platform_utils/metaflow/snowflake_connection.py index 2b41107..8a17a8b 100644 --- a/src/ds_platform_utils/metaflow/snowflake_connection.py +++ b/src/ds_platform_utils/metaflow/snowflake_connection.py @@ -80,11 +80,14 @@ def _create_snowflake_connection( conn: SnowflakeConnection = Snowflake( integration=SNOWFLAKE_INTEGRATION, client_session_keep_alive=True, - warehouse=warehouse, timezone="UTC" if use_utc else None, session_parameters={"QUERY_TAG": query_tag}, ).cn # type: ignore[attr-defined] + # Doing this in the connection parameters result in silently failing to set the warehouse, + # so we have to execute a raw query to set it. + conn.execute_string("USE WAREHOUSE {}".format(warehouse)) + return conn diff --git a/uv.lock b/uv.lock index c15589d..a099e72 100644 --- a/uv.lock +++ b/uv.lock @@ -479,7 +479,7 @@ wheels = [ [[package]] name = "ds-platform-utils" -version = "0.4.1" +version = "0.4.2" source = { editable = "." } dependencies = [ { name = "jinja2" },