Skip to content

Commit

Permalink
capitalise date_diff for sqlglot
Browse files Browse the repository at this point in the history
  • Loading branch information
RossKen committed Jun 7, 2023
1 parent 0bfe44d commit 9854cc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions splink/athena/athena_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ def datediff_sql(

if cast_str:
return f"""
abs(date_diff('{date_metric}',
abs(DATE_DIFF('{date_metric}',
DATE({col_name_l}, '{date_format}'),
DATE({col_name_r}, '{date_format}'))
) <= {date_threshold}
"""
else:
return f"""
abs(date_diff('{date_metric}',
abs(DATE_DIFF('{date_metric}',
{col_name_l},
{col_name_r})
) <= {date_threshold}
Expand Down

0 comments on commit 9854cc2

Please sign in to comment.