From 35792e994cbb2773725702ce328717b0695d142f Mon Sep 17 00:00:00 2001 From: Patryk Czajka Date: Thu, 12 Dec 2024 17:22:32 +0100 Subject: [PATCH] Temporarily disable schema existence check for object create (#1949) (#1950) * Temporarily disable schema existance check for object create * skip test --- src/snowflake/cli/api/rest_api.py | 5 +++-- tests_integration/test_object.py | 1 + 2 files changed, 4 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}/" ): diff --git a/tests_integration/test_object.py b/tests_integration/test_object.py index a7d2a57bee..3eb89383c3 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(