diff --git a/docs/posts/run-on-snowflake/index.qmd b/docs/posts/run-on-snowflake/index.qmd index 1afebe5a0007..6055cf681a3d 100644 --- a/docs/posts/run-on-snowflake/index.qmd +++ b/docs/posts/run-on-snowflake/index.qmd @@ -38,8 +38,8 @@ figure out, and these are the questions we will answer throughout the post. ## Getting the Ibis connection -The release of Ibis 9.0 includes the introduction of a new method, -[`from_snowpark`](../../backends/snowflake.qmd#ibis.backends.snowflake.Backend.from_snowpark) +The release of Ibis 9.2 includes the introduction of a new method, +[`from_connection`](../../backends/snowflake.qmd#ibis.backends.snowflake.Backend.from_connection) to provide users with a convenient mechanism to take an existing Snowpark session and create an Ibis Snowflake backend instance with it. @@ -50,7 +50,7 @@ import ibis import snowflake.snowpark as sp session = sp.Session.builder.create() -con = ibis.snowflake.from_snowpark(session) +con = ibis.snowflake.from_connection(session) ``` This connection uses the same session within Snowflake, so temporary objects diff --git a/ibis/backends/snowflake/__init__.py b/ibis/backends/snowflake/__init__.py index 6a03a8eb4e49..1e90a4eada02 100644 --- a/ibis/backends/snowflake/__init__.py +++ b/ibis/backends/snowflake/__init__.py @@ -274,7 +274,7 @@ def _setup_session(self, *, session_parameters, create_object_udfs: bool): f"Unable to create Ibis UDFs, some functionality will not work: {e}" ) - @util.experimental + @util.deprecated(as_of="10.0", instead="use from_connection instead") @classmethod def from_snowpark( cls, session: snowflake.snowpark.Session, *, create_object_udfs: bool = True diff --git a/ibis/backends/snowflake/tests/conftest.py b/ibis/backends/snowflake/tests/conftest.py index 4aeb3d8e0dea..8b309d71d7db 100644 --- a/ibis/backends/snowflake/tests/conftest.py +++ b/ibis/backends/snowflake/tests/conftest.py @@ -209,7 +209,7 @@ def connect(*, tmpdir, worker_id, **kw) -> BaseBackend: "schema": os.environ["SNOWFLAKE_SCHEMA"], } ) - return ibis.backends.snowflake.Backend.from_snowpark(builder.create()) + return ibis.backends.snowflake.Backend.from_connection(builder.create()) else: return ibis.connect(_get_url(), **kw) diff --git a/ibis/backends/snowflake/tests/test_udf.py b/ibis/backends/snowflake/tests/test_udf.py index 4a59013cebec..f73f79c17380 100644 --- a/ibis/backends/snowflake/tests/test_udf.py +++ b/ibis/backends/snowflake/tests/test_udf.py @@ -238,7 +238,7 @@ def test_ibis_inside_snowpark(snowpark_session, execute_as): def ibis_sproc(session): import ibis.backends.snowflake - con = ibis.backends.snowflake.Backend.from_snowpark(session) + con = ibis.backends.snowflake.Backend.from_connection(session) expr = ( con.tables.functional_alltypes.group_by("string_col") diff --git a/ibis/backends/tests/test_client.py b/ibis/backends/tests/test_client.py index ccb01e1cc87c..e2ce59d0c6bd 100644 --- a/ibis/backends/tests/test_client.py +++ b/ibis/backends/tests/test_client.py @@ -317,7 +317,9 @@ def test_create_table_from_schema(con, new_schema, temp_table): ) def test_create_temporary_table_from_schema(con_no_data, new_schema): if con_no_data.name == "snowflake" and os.environ.get("SNOWFLAKE_SNOWPARK"): - with pytest.raises(com.IbisError, match="Reconnecting is not supported"): + with pytest.raises( + com.IbisError, match="Cannot reconnect to unconfigured .+ backend" + ): con_no_data.reconnect() return