Skip to content

Commit

Permalink
cast string as date
Browse files Browse the repository at this point in the history
  • Loading branch information
sydneynotthecity committed Dec 9, 2024
1 parent 836d73c commit 7312829
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dags/queries/create_table.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ options (partition_expiration_days = 450) as (
select *
from `{project_id}.{dataset_id}.{table_id}`
where
batch_run_date >= date_trunc(date_sub('{batch_run_date}', interval 15 month), day)
and batch_run_date < date_trunc('{batch_run_date}', day)
batch_run_date >= date_trunc(date_sub(date('{batch_run_date}'), interval 15 month), day)
and batch_run_date < date_trunc(date('{batch_run_date}'), day)
)

0 comments on commit 7312829

Please sign in to comment.