Skip to content

Commit

Permalink
Fix: Add fully qualified name in cache to swapping method (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
tinomerl authored Mar 28, 2024
1 parent f587cbe commit 3e5cc4b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions airbyte/_processors/sql/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -794,9 +794,11 @@ def _swap_temp_table_with_final_table(
deletion_name = f"{final_table_name}_deleteme"
commands = "\n".join(
[
f"ALTER TABLE {final_table_name} RENAME TO {deletion_name};",
f"ALTER TABLE {temp_table_name} RENAME TO {final_table_name};",
f"DROP TABLE {deletion_name};",
f"ALTER TABLE {self._fully_qualified(final_table_name)} RENAME "
f"TO {deletion_name};",
f"ALTER TABLE {self._fully_qualified(temp_table_name)} RENAME "
f"TO {final_table_name};",
f"DROP TABLE {self._fully_qualified(deletion_name)};",
]
)
self._execute_sql(commands)
Expand Down

0 comments on commit 3e5cc4b

Please sign in to comment.