From 583b4fe8a44d8bcaf5dfa1e894aa59d27b6371fa Mon Sep 17 00:00:00 2001 From: Patryk Czajka Date: Thu, 12 Dec 2024 16:03:21 +0100 Subject: [PATCH 1/2] Temporarily disable schema existance check for object create --- src/snowflake/cli/api/rest_api.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/snowflake/cli/api/rest_api.py b/src/snowflake/cli/api/rest_api.py index ae829645b8..0125d51428 100644 --- a/src/snowflake/cli/api/rest_api.py +++ b/src/snowflake/cli/api/rest_api.py @@ -155,8 +155,9 @@ def determine_url_for_create_query( raise SchemaNotDefinedException( "Schema not defined in connection. Please try again with `--schema` flag." ) - if not self._schema_exists(db_name=db, schema_name=schema): - raise SchemaNotExistsException(f"Schema '{schema}' does not exist.") + # temporarily disable this check due to an issue on server side: SNOW-1747450 + # if not self._schema_exists(db_name=db, schema_name=schema): + # raise SchemaNotExistsException(f"Schema '{schema}' does not exist.") if self.get_endpoint_exists( url := f"{SF_REST_API_URL_PREFIX}/databases/{self.conn.database}/schemas/{self.conn.schema}/{plural_object_type}/" ): From 3a283d12a979f9bf21f0ad7e37642b9a693e5a68 Mon Sep 17 00:00:00 2001 From: Patryk Czajka Date: Thu, 12 Dec 2024 16:28:54 +0100 Subject: [PATCH 2/2] skip test --- tests_integration/test_object.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests_integration/test_object.py b/tests_integration/test_object.py index 386150438b..9dbe526125 100644 --- a/tests_integration/test_object.py +++ b/tests_integration/test_object.py @@ -313,6 +313,7 @@ def test_create_error_database_not_exist(runner): @pytest.mark.integration +@pytest.mark.skip(reason="Server-side issue: SNOW-1855040") def test_create_error_schema_not_exist(runner, test_database): # schema does not exist result = runner.invoke_with_connection(