Skip to content

Commit

Permalink
Fix sqlalchemy 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
steinitzu committed Oct 2, 2024
1 parent b8a3845 commit ca04c9d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dlt/destinations/impl/sqlalchemy/merge_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def gen_merge_sql(
if len(table_chain) == 1 and not cls.requires_temp_table_for_delete():
delete_statement = root_table_obj.delete().where(
sa.exists(
sa.select([sa.literal(1)])
sa.select(sa.literal(1))
.where(key_clause)
.select_from(staging_root_table_obj)
)
Expand All @@ -81,9 +81,9 @@ def gen_merge_sql(
# Insert data into the "temporary" table
insert_statement = delete_temp_table.insert().from_select(
[row_key_col],
sa.select([row_key_col]).where(
sa.select(row_key_col).where(
sa.exists(
sa.select([sa.literal(1)])
sa.select(sa.literal(1))
.where(key_clause)
.select_from(staging_root_table_obj)
)
Expand Down

0 comments on commit ca04c9d

Please sign in to comment.