Skip to content

Commit

Permalink
remove drop tables logic
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyyid committed Nov 25, 2024
1 parent 06e5318 commit 91e74eb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions target_mssql/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions target_mssql/sinks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 91e74eb

Please sign in to comment.