Skip to content

Commit

Permalink
Merge pull request #53 from DalgoT4D/minor-bug-fix
Browse files Browse the repository at this point in the history
quote column name requires warehouse type
  • Loading branch information
fatchat authored Feb 12, 2024
2 parents d584094 + 3616787 commit decc577
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dbt_automation/utils/bigquery.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def get_table_data(
# order
if order_by:
query += f"""
ORDER BY {quote_columnname(order_by)} {"ASC" if order == 1 else "DESC"}
ORDER BY {quote_columnname(order_by, "bigquery")} {"ASC" if order == 1 else "DESC"}
"""

# offset, limit
Expand Down
2 changes: 1 addition & 1 deletion dbt_automation/utils/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def get_table_data(
# order
if order_by:
query += f"""
ORDER BY {quote_columnname(order_by)} {"ASC" if order == 1 else "DESC"}
ORDER BY {quote_columnname(order_by, "postgres")} {"ASC" if order == 1 else "DESC"}
"""

# offset, limit
Expand Down

0 comments on commit decc577

Please sign in to comment.