diff --git a/dags/queries/create_table.sql b/dags/queries/create_table.sql index 8b3fee9e..12826f5e 100644 --- a/dags/queries/create_table.sql +++ b/dags/queries/create_table.sql @@ -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) )