From 91e74eb83c9b96f15ae7e739776c330855a15f57 Mon Sep 17 00:00:00 2001 From: Hassan Syyid Date: Sun, 24 Nov 2024 18:11:55 -0700 Subject: [PATCH] remove drop tables logic --- target_mssql/connector.py | 8 ++++---- target_mssql/sinks.py | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target_mssql/connector.py b/target_mssql/connector.py index 311f7e9..0926991 100644 --- a/target_mssql/connector.py +++ b/target_mssql/connector.py @@ -40,10 +40,10 @@ def prepare_table( """ # NOTE: Force create the table # TODO: remove this - if not self.dropped_tables.get(full_table_name, False): - self.logger.info("Force dropping the table!") - self.connection.execute(f"DROP TABLE IF EXISTS {full_table_name};") - self.dropped_tables[full_table_name] = True + # if not self.dropped_tables.get(full_table_name, False): + # self.logger.info("Force dropping the table!") + # self.connection.execute(f"DROP TABLE IF EXISTS {full_table_name};") + # self.dropped_tables[full_table_name] = True if not self.table_exists(full_table_name=full_table_name): self.create_empty_table( diff --git a/target_mssql/sinks.py b/target_mssql/sinks.py index 103cbea..97c77a3 100644 --- a/target_mssql/sinks.py +++ b/target_mssql/sinks.py @@ -167,10 +167,10 @@ def prepare_table( """ # NOTE: Force create the table # TODO: remove this - if not self.dropped_tables.get(self.stream_name, False): - self.logger.info("Force dropping the table!") - self.connector.connection.execute(f"DROP TABLE IF EXISTS {self.full_table_name};") - self.dropped_tables[self.stream_name] = True + # if not self.dropped_tables.get(self.stream_name, False): + # self.logger.info("Force dropping the table!") + # self.connector.connection.execute(f"DROP TABLE IF EXISTS {self.full_table_name};") + # self.dropped_tables[self.stream_name] = True if not self.table_exists(full_table_name=full_table_name): self.create_empty_table(