diff --git a/target_mssql/connector.py b/target_mssql/connector.py index 35b806d..311f7e9 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(self.stream_name, False): + 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 {self.full_table_name};") - self.dropped_tables[self.stream_name] = True + 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(