Skip to content

Commit

Permalink
parse None as sql null
Browse files Browse the repository at this point in the history
  • Loading branch information
Ishankoradia committed May 9, 2024
1 parent 14be654 commit cf9bb99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dbt_automation/utils/columnutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def quote_columnname(colname: str, warehouse: str):

def quote_constvalue(value: str, warehouse: str):
"""encloses a constant string value inside proper quotes"""
if value is None or value.strip().lower() == "none":
return "'" + "NULL" + "'"

if warehouse == "postgres":
return "'" + value + "'"
elif warehouse == "bigquery":
Expand Down

0 comments on commit cf9bb99

Please sign in to comment.