From cf837fbcc741c678bb338bc690d898e16ee07daa Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 16 Jul 2026 12:47:01 -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 8ed5ad9..31298cb 100644 --- a/integration_tests/ci/test_scenarios.yml +++ b/integration_tests/ci/test_scenarios.yml @@ -15,6 +15,7 @@ additional_schema_variables: include_databricks_sql: false include_sqlserver: false +include_duckdb: true include_dbt_compile: false test_scenarios: From 794af327d6914f387c5eee286a6ba9f3893f3b01 Mon Sep 17 00:00:00 2001 From: Catherine Fritz <111930712+fivetran-catfritz@users.noreply.github.com> Date: Thu, 16 Jul 2026 15:42:20 -0500 Subject: [PATCH 2/2] fix: DuckDB compatibility - fix 3-argument json_extract_path_text for DuckDB Add duckdb__json_parse macro that uses json_extract_string/json_extract instead of the 3-argument json_extract_path_text form DuckDB does not support. Add fivetran_utils dispatch override in integration_tests so the macro is resolved correctly for DuckDB targets. Co-Authored-By: Claude Sonnet 4.6 --- integration_tests/dbt_project.yml | 2 ++ macros/duckdb__json_parse.sql | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 macros/duckdb__json_parse.sql diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 750d0d5..3ffd95b 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -42,6 +42,8 @@ vars: dispatch: - macro_namespace: dbt_utils search_order: ['spark_utils', 'dbt_utils'] + - macro_namespace: fivetran_utils + search_order: ['social_media_reporting', 'fivetran_utils'] models: +persist_docs: diff --git a/macros/duckdb__json_parse.sql b/macros/duckdb__json_parse.sql new file mode 100644 index 0000000..e09870a --- /dev/null +++ b/macros/duckdb__json_parse.sql @@ -0,0 +1,8 @@ +{% macro duckdb__json_parse(string, string_path) %} + + json_extract_string( + {{ string }}, + '$.{%- for s in string_path -%}{{ s }}{%- if not loop.last -%}.{%- endif -%}{%- endfor -%}' + ) + +{% endmacro %}