From a531e631522f3ccc9b73f9c0b7a5544b49bf742c Mon Sep 17 00:00:00 2001 From: rajaths010494 Date: Wed, 8 Feb 2023 22:19:01 +0530 Subject: [PATCH] Don't fail if not tables are present --- .../astro_deploy/example_snowflake_cleanup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python-sdk/tests_integration/astro_deploy/example_snowflake_cleanup.py b/python-sdk/tests_integration/astro_deploy/example_snowflake_cleanup.py index 53fff17280..fcce66a8cd 100644 --- a/python-sdk/tests_integration/astro_deploy/example_snowflake_cleanup.py +++ b/python-sdk/tests_integration/astro_deploy/example_snowflake_cleanup.py @@ -19,6 +19,9 @@ def make_drop_statements(task_instance: Any): for temp_table in temp_tables: temp_table = "DROP TABLE IF EXISTS " + temp_table["TABLE_NAME"] + ";" delete_temp_tables += temp_table + print(len(delete_temp_tables)) + if len(delete_temp_tables) == 0: + delete_temp_tables = "Select 1" return delete_temp_tables