diff --git a/target_snowflake/sinks.py b/target_snowflake/sinks.py index 2ee1d70..e08215a 100644 --- a/target_snowflake/sinks.py +++ b/target_snowflake/sinks.py @@ -79,6 +79,9 @@ def setup(self) -> None: self.connector.prepare_schema( self.conform_name(self.schema_name, object_type="schema"), ) + + self.connector.table_cache.pop(self.full_table_name, None) + try: self.connector.prepare_table( full_table_name=self.full_table_name, @@ -90,6 +93,8 @@ def setup(self) -> None: self.logger.exception("Error creating %s %s", self.full_table_name, self.conform_schema(self.schema)) raise + self.connector.table_cache.pop(self.full_table_name, None) + def conform_name( self, name: str,