Skip to content

Commit

Permalink
fix: always quote partition by
Browse files Browse the repository at this point in the history
  • Loading branch information
pquadri committed Oct 8, 2024
1 parent 29a5c75 commit 3dc6b03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions snowflake_utils/models/table.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,9 @@ def qualify(
primary_keys: list[str],
replication_keys: list[str] | None,
) -> None:
qualify_partition = ",".join(primary_keys)
qualify_partition = ",".join(f'"{c.upper()}"' for c in primary_keys)
qualify_order = ",".join(
f"{c} desc" for c in (replication_keys or primary_keys)
f'"{c.upper()}" desc' for c in (replication_keys or primary_keys)
)
logging.debug(
f"Adding QUALIFY to table {self.fqn} on PARTITION {qualify_partition} ORDERED BY {qualify_order}"
Expand Down

0 comments on commit 3dc6b03

Please sign in to comment.