From e4b45c8eab6584b3697bc765c8073338dff07537 Mon Sep 17 00:00:00 2001 From: Eric Michael Martinez Date: Sun, 6 Aug 2023 23:43:42 -0500 Subject: [PATCH 1/5] add duckdb for date_spline code --- models/intermediate/int_stripe__date_spine.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/models/intermediate/int_stripe__date_spine.sql b/models/intermediate/int_stripe__date_spine.sql index 6f22108b..4044f256 100644 --- a/models/intermediate/int_stripe__date_spine.sql +++ b/models/intermediate/int_stripe__date_spine.sql @@ -1,13 +1,12 @@ with spine as ( - {% if execute %} {% set first_date_query %} select min( created_at ) as min_date from {{ ref('stripe__balance_transactions') }} {% endset %} {% set first_date = run_query(first_date_query).columns[0][0]|string %} - {% if target.type == 'postgres' %} + {% if target.type == 'postgres' or target.type == 'duckdb' %} {% set first_date_adjust = "cast('" ~ first_date[0:10] ~ "' as date)" %} {% else %} @@ -34,7 +33,7 @@ with spine as ( {% else %} {% set last_date = run_query(current_date_query).columns[0][0]|string %} {% endif %} - {% if target.type == 'postgres' %} + {% if target.type == 'postgres' or target.type == 'duckdb' %} {% set last_date_adjust = "cast('" ~ last_date[0:10] ~ "' as date)" %} {% else %} From 657c06589d788f2edaa0ce459d64d017e51f7bc1 Mon Sep 17 00:00:00 2001 From: Eric Michael Martinez Date: Mon, 7 Aug 2023 00:03:36 -0500 Subject: [PATCH 2/5] add changelog, bump version --- CHANGELOG.md | 7 +++++++ dbt_project.yml | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ef1df532..159a723d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# dbt_stripe v0.10.2 +## 🎉 Feature Updates +- Included support for DuckDB via ([#67](https://github.com/fivetran/dbt_stripe/pull/67)) + +## Contributors +- [ericmichael](https://github.com/ericmichael) ([#67](https://github.com/fivetran/dbt_stripe/pull/67)) + # dbt_stripe v0.UPDATE.UPDATE ## Under the Hood: diff --git a/dbt_project.yml b/dbt_project.yml index ec996407..f0399e68 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'stripe' -version: '0.10.1' +version: '0.10.2' require-dbt-version: [">=1.3.0", "<2.0.0"] models: stripe: From df1c697336d78be90d19edc12db12e33a374bcad Mon Sep 17 00:00:00 2001 From: Eric Michael Martinez Date: Mon, 7 Aug 2023 00:04:31 -0500 Subject: [PATCH 3/5] bump integration test version: --- integration_tests/dbt_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index f854e407..38450eb4 100644 --- a/integration_tests/dbt_project.yml +++ b/integration_tests/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'stripe_integration_tests' -version: '0.10.1' +version: '0.10.2' profile: 'integration_tests' From 08550a987a7eb199c953f4d45910ff0b657e95f5 Mon Sep 17 00:00:00 2001 From: Eric Michael Martinez Date: Mon, 7 Aug 2023 00:05:41 -0500 Subject: [PATCH 4/5] revert whitespace change --- models/intermediate/int_stripe__date_spine.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/models/intermediate/int_stripe__date_spine.sql b/models/intermediate/int_stripe__date_spine.sql index 4044f256..2e3c7655 100644 --- a/models/intermediate/int_stripe__date_spine.sql +++ b/models/intermediate/int_stripe__date_spine.sql @@ -1,5 +1,6 @@ with spine as ( + {% if execute %} {% set first_date_query %} select min( created_at ) as min_date from {{ ref('stripe__balance_transactions') }} From 4b8437361af727640cb2f78377d5e238ff60e751 Mon Sep 17 00:00:00 2001 From: Eric Michael Martinez Date: Mon, 7 Aug 2023 00:06:01 -0500 Subject: [PATCH 5/5] fix --- models/intermediate/int_stripe__date_spine.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/intermediate/int_stripe__date_spine.sql b/models/intermediate/int_stripe__date_spine.sql index 2e3c7655..6c48caad 100644 --- a/models/intermediate/int_stripe__date_spine.sql +++ b/models/intermediate/int_stripe__date_spine.sql @@ -1,6 +1,6 @@ with spine as ( - + {% if execute %} {% set first_date_query %} select min( created_at ) as min_date from {{ ref('stripe__balance_transactions') }}