From 28a9a75ef2dc2b3e8c8b31fa5547ad147f65df18 Mon Sep 17 00:00:00 2001 From: Claus Herther Date: Wed, 28 Dec 2022 09:40:11 -0800 Subject: [PATCH] Fix dangling datediff reference (#233) --- .../expect_row_values_to_have_data_for_every_n_datepart.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql b/macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql index 850c1c4..267e38e 100644 --- a/macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql +++ b/macros/schema_tests/distributional/expect_row_values_to_have_data_for_every_n_datepart.sql @@ -83,7 +83,7 @@ model_data as ( {{ dbt.dateadd( date_part, "mod( - cast(" ~ datediff("'" ~ start_date ~ "'", date_col, date_part) ~ " as " ~ dbt.type_int() ~ " ), + cast(" ~ dbt.datediff("'" ~ start_date ~ "'", date_col, date_part) ~ " as " ~ dbt.type_int() ~ " ), cast(" ~ interval ~ " as " ~ dbt.type_int() ~ " ) ) * (-1)", "cast( " ~ dbt.date_trunc(date_part, date_col) ~ " as " ~ dbt_expectations.type_datetime() ~ ")"