From 71629da52a40c1a2701100640d3cd747c7170cc1 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:46:20 -0500 Subject: [PATCH 1/2] Add include_duckdb: true to CI test scenarios --- integration_tests/ci/test_scenarios.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/integration_tests/ci/test_scenarios.yml b/integration_tests/ci/test_scenarios.yml index 7df6387..756b6ff 100644 --- a/integration_tests/ci/test_scenarios.yml +++ b/integration_tests/ci/test_scenarios.yml @@ -10,6 +10,7 @@ schema_variable_name: "linkedin_ads_schema" include_databricks_sql: false include_sqlserver: false +include_duckdb: true include_dbt_compile: true test_scenarios: From d6d1c98ddab440ca22f54258c2e878ffaa9b6029 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 16 Jul 2026 15:37:07 -0500 Subject: [PATCH 2/2] fix: DuckDB compatibility - replace to_date() with cast(col as date) in monthly analytics models Co-Authored-By: Claude Sonnet 4.6 --- macros/staging/date_from_month_string.sql | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/macros/staging/date_from_month_string.sql b/macros/staging/date_from_month_string.sql index 83f0445..f85b81c 100644 --- a/macros/staging/date_from_month_string.sql +++ b/macros/staging/date_from_month_string.sql @@ -18,3 +18,10 @@ concat(split({{ month_str }}, '-')[0], '-', lpad(split({{ month_str }}, '-')[1], 2, '0'), '-01') ) {% endmacro %} + +{% macro duckdb__date_from_month_string(month_str) %} + cast( + split_part({{ month_str }}, '-', 1) || '-' || lpad(split_part({{ month_str }}, '-', 2), 2, '0') || '-01' + as date + ) +{% endmacro %}