From a4fc865f9f5501488a30a3170a4607f893e36e33 Mon Sep 17 00:00:00 2001 From: Dean Morin Date: Wed, 23 Nov 2022 11:36:49 -0800 Subject: [PATCH] Don't set data retention time when creating a table Workaround for https://github.com/transferwise/pipelinewise-target-snowflake/issues/331 --- target_snowflake/db_sync.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target_snowflake/db_sync.py b/target_snowflake/db_sync.py index ffac46c5..c4d9a93f 100644 --- a/target_snowflake/db_sync.py +++ b/target_snowflake/db_sync.py @@ -565,7 +565,7 @@ def create_table_query(self, is_temporary=False): p_temp = 'TEMP ' if is_temporary else '' p_table_name = self.table_name(stream_schema_message['stream'], is_temporary) p_columns = ', '.join(columns + primary_key) - p_extra = 'data_retention_time_in_days = 0 ' if is_temporary else 'data_retention_time_in_days = 1 ' + p_extra = 'data_retention_time_in_days = 0 ' if is_temporary else '' return f'CREATE {p_temp}TABLE IF NOT EXISTS {p_table_name} ({p_columns}) {p_extra}' def grant_usage_on_schema(self, schema_name, grantee):