Skip to content

Commit

Permalink
fix fmt deltalake.py
Browse files Browse the repository at this point in the history
  • Loading branch information
guitcastro authored Jan 14, 2025
1 parent daae03f commit f613ac6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dlt/common/libs/deltalake.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,13 @@ def merge_delta_table(
else:
primary_keys = get_columns_names_with_prop(schema, "primary_key")
predicate = " AND ".join([f"target.{c} = source.{c}" for c in primary_keys])

dedup_tuple = get_dedup_sort_tuple(schema)
if dedup_tuple:
dedup_column, dedup_sort = dedup_tuple
dedup_operator = ">" if dedup_sort == "desc" else "<"
dedup_query = f"target.{dedup_column} {dedup_operator} source.{dedup_column}"
else:
dedup_query = None

dedup_query = None
partition_by = get_columns_names_with_prop(schema, "partition")
qry = (
table.merge(
Expand Down

0 comments on commit f613ac6

Please sign in to comment.