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: 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 %}