From 1cbb12c34b7c90c3ceedcbd7255b41dc447be523 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Mon, 13 Mar 2023 12:02:51 -0500 Subject: [PATCH 01/10] update stripe package with running total model --- .../int_stripe__account_partitions.sql | 1 - .../int_stripe__account_rolling_totals.sql | 2 + .../int_stripe__account_running_totals.sql | 46 +++++++++++++++++++ models/stripe.yml | 20 ++++++++ models/stripe__daily_overview.sql | 30 ++---------- 5 files changed, 71 insertions(+), 28 deletions(-) create mode 100644 models/intermediate/int_stripe__account_running_totals.sql diff --git a/models/intermediate/int_stripe__account_partitions.sql b/models/intermediate/int_stripe__account_partitions.sql index 6f44a511..a7aed9bd 100644 --- a/models/intermediate/int_stripe__account_partitions.sql +++ b/models/intermediate/int_stripe__account_partitions.sql @@ -6,7 +6,6 @@ with account_rolling_totals as ( from {{ ref('int_stripe__account_rolling_totals') }} ), - final as ( select diff --git a/models/intermediate/int_stripe__account_rolling_totals.sql b/models/intermediate/int_stripe__account_rolling_totals.sql index bd56f820..4b53780e 100644 --- a/models/intermediate/int_stripe__account_rolling_totals.sql +++ b/models/intermediate/int_stripe__account_rolling_totals.sql @@ -25,6 +25,7 @@ with date_spine as ( ), final as ( select + date_spine.account_id, date_spine.date_day, date_spine.date_week, date_spine.date_month, @@ -46,6 +47,7 @@ with date_spine as ( from date_spine left join account_rolling_totals on account_rolling_totals.date_day = date_spine.date_day + and account_rolling_totals.account_id = date_spine.account_id and account_rolling_totals.source_relation = date_spine.source_relation ) diff --git a/models/intermediate/int_stripe__account_running_totals.sql b/models/intermediate/int_stripe__account_running_totals.sql new file mode 100644 index 00000000..b52f6896 --- /dev/null +++ b/models/intermediate/int_stripe__account_running_totals.sql @@ -0,0 +1,46 @@ +{% set rolling_fields = ['rolling_total_daily_sales_amount', 'rolling_total_daily_refunds_amount', 'rolling_total_daily_adjustments_amount', 'rolling_total_daily_other_transactions_amount', 'rolling_total_daily_gross_transaction_amount', 'rolling_total_daily_net_transactions_amount', 'rolling_total_daily_payout_fee_amount', 'rolling_total_daily_gross_payout_amount', 'rolling_daily_net_activity_amount', 'rolling_daily_end_balance_amount', 'rolling_total_daily_sales_count', 'rolling_total_daily_payouts_count', 'rolling_total_daily_adjustments_count', 'rolling_total_daily_failed_charge_count', 'rolling_total_daily_failed_charge_amount'] %} + + +with account_partitions as ( + + select * + from {{ ref('int_stripe__account_partitions') }} +), + +final as ( + + select + account_id, + {{ dbt_utils.generate_surrogate_key(['account_id','date_day']) }} as account_daily_id, + + date_day, + date_week, + date_month, + date_year, + date_index, + coalesce(total_daily_sales_amount,0) as total_daily_sales_amount, + coalesce(total_daily_refunds_amount,0) as total_daily_refunds_amount, + coalesce(total_daily_adjustments_amount,0) as total_daily_adjustments_amount, + coalesce(total_daily_other_transactions_amount,0) as total_daily_other_transactions_amount, + coalesce(total_daily_gross_transaction_amount,0) as total_daily_gross_transaction_amount, + coalesce(total_daily_net_transactions_amount,0) as total_daily_net_transactions_amount, + coalesce(total_daily_payout_fee_amount,0) as total_daily_payout_fee_amount, + coalesce(total_daily_gross_payout_amount,0) as total_daily_gross_payout_amount, + coalesce(daily_net_activity_amount,0) as daily_net_activity_amount, + coalesce(daily_end_balance_amount,0) as daily_end_balance_amount, + coalesce(total_daily_sales_count,0) as total_daily_sales_count, + coalesce(total_daily_payouts_count,0) as total_daily_payouts_count, + coalesce(total_daily_adjustments_count,0) as total_daily_adjustments_count, + coalesce(total_daily_failed_charge_count,0) as total_daily_failed_charge_count, + coalesce(total_daily_failed_charge_amount,0) as total_daily_failed_charge_amount, + {% for f in rolling_fields %} + coalesce({{ f }}, + first_value({{ f }}) over (partition by {{ f }}_partition order by date_day rows unbounded preceding)) as {{ f }} + {%- if not loop.last -%},{%- endif -%} + {% endfor %} + + from account_partitions +) + +select * +from final \ No newline at end of file diff --git a/models/stripe.yml b/models/stripe.yml index ee3a33ad..b62e7b03 100644 --- a/models/stripe.yml +++ b/models/stripe.yml @@ -1,6 +1,24 @@ version: 2 models: + - name: int_stripe__account_daily + description: Each record represents each day's ending balances per account. + + - name: int_stripe__account_partitions + description: Each record is a group of partitioned account totals updating null values with zeroes to eventually calculate running totals downstream. + + - name: int_stripe__account_rolling_totals + description: Each record represents each day's ending balances per account, in addition to changes over time. + + - name: int_stripe__account_running_totals + description: Each record represents each day's ending balances per account, changes over time, and daily running (cumulative) balances. + + - name: int_stripe__date_spine + description: Each record represents a day of each calendar year. + + - name: int_stripe__incomplete_charges + description: Each record represents a charge that is incomplete. + - name: stripe__balance_transactions description: Each record represents a change to your account balance, enriched with data about the transaction. tests: @@ -390,6 +408,8 @@ models: - date_day - source_relation columns: + - name: account_id + description: The ID of the account tied to the balance. - name: date_day description: Day of record, taken from the date of each balance transaction. - name: source_relation diff --git a/models/stripe__daily_overview.sql b/models/stripe__daily_overview.sql index 7a022e7c..eb06ca3a 100644 --- a/models/stripe__daily_overview.sql +++ b/models/stripe__daily_overview.sql @@ -1,32 +1,8 @@ -{% set total_fields = ['total_daily_sales_amount', 'total_daily_refunds_amount', 'total_daily_adjustments_amount', 'total_daily_other_transactions_amount', 'total_daily_gross_transaction_amount', 'total_daily_net_transactions_amount', 'total_daily_payout_fee_amount', 'total_daily_gross_payout_amount', 'daily_net_activity_amount', 'daily_end_balance_amount', 'total_daily_sales_count', 'total_daily_payouts_count', 'total_daily_adjustments_count', 'total_daily_failed_charge_count', 'total_daily_failed_charge_amount'] %} -{% set rolling_fields = ['rolling_total_daily_sales_amount', 'rolling_total_daily_refunds_amount', 'rolling_total_daily_adjustments_amount', 'rolling_total_daily_other_transactions_amount', 'rolling_total_daily_gross_transaction_amount', 'rolling_total_daily_net_transactions_amount', 'rolling_total_daily_payout_fee_amount', 'rolling_total_daily_gross_payout_amount', 'rolling_daily_net_activity_amount', 'rolling_daily_end_balance_amount', 'rolling_total_daily_sales_count', 'rolling_total_daily_payouts_count', 'rolling_total_daily_adjustments_count', 'rolling_total_daily_failed_charge_count', 'rolling_total_daily_failed_charge_amount'] %} - -with account_partitions as ( +with final as ( select * - from {{ ref('int_stripe__account_partitions') }} - -), final as ( - - select - date_day, - date_week, - date_month, - date_year, - - {% for t in total_fields %} - {{ t }}, - {% endfor %} - - {% for f in rolling_fields %} - coalesce({{ f }}, - first_value({{ f }}) over (partition by {{ f }}_partition order by date_day rows unbounded preceding)) as {{ f }}, - {% endfor %} - - source_relation - - from account_partitions -) + from {{ ref('int_stripe__account_running_totals') }} +) select * from final \ No newline at end of file From ebc7ad59b3266e05c3c927008fe32f11287d92a6 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Mon, 13 Mar 2023 12:04:46 -0500 Subject: [PATCH 02/10] version --- dbt_project.yml | 2 +- integration_tests/dbt_project.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dbt_project.yml b/dbt_project.yml index a585420d..753c010a 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,7 +1,7 @@ config-version: 2 name: 'stripe' -version: '0.9.0' +version: '0.10.0' require-dbt-version: [">=1.3.0", "<2.0.0"] models: stripe: diff --git a/integration_tests/dbt_project.yml b/integration_tests/dbt_project.yml index 3dea9cc7..5b123465 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.9.0' +version: '0.10.0' profile: 'integration_tests' From 3719deeebbf6106acee6d74a34876702dca63f2a Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Mon, 13 Mar 2023 12:07:23 -0500 Subject: [PATCH 03/10] update --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9b61a61..d365cc70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ + +# dbt_stripe v0.10.0 +[#60](https://github.com/fivetran/dbt_stripe/pull/60) includes the following changes: +## 🚨 Breaking Changes 🚨: +- - Introduces a `int_stripe__account_running_totals` model to alleviate runtime errors resulting from the `stripe__daily_overview` model exceeding disc capacity upon running. + # dbt_stripe v0.9.0 [#56](https://github.com/fivetran/dbt_stripe/pull/56) includes the following changes: From 27ac68dbdc27c97bc60575aebf687958f24d4486 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Mon, 13 Mar 2023 12:38:52 -0500 Subject: [PATCH 04/10] add source relation --- models/intermediate/int_stripe__account_running_totals.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/models/intermediate/int_stripe__account_running_totals.sql b/models/intermediate/int_stripe__account_running_totals.sql index b52f6896..62cb26cc 100644 --- a/models/intermediate/int_stripe__account_running_totals.sql +++ b/models/intermediate/int_stripe__account_running_totals.sql @@ -18,6 +18,7 @@ final as ( date_month, date_year, date_index, + source_relation, coalesce(total_daily_sales_amount,0) as total_daily_sales_amount, coalesce(total_daily_refunds_amount,0) as total_daily_refunds_amount, coalesce(total_daily_adjustments_amount,0) as total_daily_adjustments_amount, From bcdc4f3b2cd8a4c9a7f3f39fc59751cfc63d8837 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Mon, 13 Mar 2023 15:13:46 -0500 Subject: [PATCH 05/10] update --- dbt_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_project.yml b/dbt_project.yml index 753c010a..e3c1c98e 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -8,7 +8,7 @@ models: +schema: stripe +materialized: table intermediate: - +materialized: ephemeral + +materialized: table vars: stripe: account: "{{ ref('stg_stripe__account') }}" From 2feea9c708b06816e568a7d9b0d412d2376bb5ab Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Thu, 16 Mar 2023 13:35:14 -0500 Subject: [PATCH 06/10] update changelog and add view materialization --- CHANGELOG.md | 7 ++++++- models/intermediate/int_stripe__account_running_totals.sql | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d365cc70..0b503001 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,12 @@ # dbt_stripe v0.10.0 [#60](https://github.com/fivetran/dbt_stripe/pull/60) includes the following changes: ## 🚨 Breaking Changes 🚨: -- - Introduces a `int_stripe__account_running_totals` model to alleviate runtime errors resulting from the `stripe__daily_overview` model exceeding disc capacity upon running. +- Introduces a `int_stripe__account_running_totals` model to alleviate runtime errors resulting from the `stripe__daily_overview` model exceeding disc capacity upon running. +- Add `account_id` in `int_stripe__account_rolling_totals` for use as part of the join in the case where more than 1 `account_id` exists. + +## Under the Hood +- The previous logic from `stripe__daily_overview` has been moved to the intermediate `int_stripe__account_running_totals` model to help optimize runtime. +- Intermediate model materializations have changed from ephemeral to table to help with the complexity of calculations. # dbt_stripe v0.9.0 diff --git a/models/intermediate/int_stripe__account_running_totals.sql b/models/intermediate/int_stripe__account_running_totals.sql index 62cb26cc..c2799a71 100644 --- a/models/intermediate/int_stripe__account_running_totals.sql +++ b/models/intermediate/int_stripe__account_running_totals.sql @@ -1,5 +1,6 @@ -{% set rolling_fields = ['rolling_total_daily_sales_amount', 'rolling_total_daily_refunds_amount', 'rolling_total_daily_adjustments_amount', 'rolling_total_daily_other_transactions_amount', 'rolling_total_daily_gross_transaction_amount', 'rolling_total_daily_net_transactions_amount', 'rolling_total_daily_payout_fee_amount', 'rolling_total_daily_gross_payout_amount', 'rolling_daily_net_activity_amount', 'rolling_daily_end_balance_amount', 'rolling_total_daily_sales_count', 'rolling_total_daily_payouts_count', 'rolling_total_daily_adjustments_count', 'rolling_total_daily_failed_charge_count', 'rolling_total_daily_failed_charge_amount'] %} +{{ config(materialized='view') }} +{% set rolling_fields = ['rolling_total_daily_sales_amount', 'rolling_total_daily_refunds_amount', 'rolling_total_daily_adjustments_amount', 'rolling_total_daily_other_transactions_amount', 'rolling_total_daily_gross_transaction_amount', 'rolling_total_daily_net_transactions_amount', 'rolling_total_daily_payout_fee_amount', 'rolling_total_daily_gross_payout_amount', 'rolling_daily_net_activity_amount', 'rolling_daily_end_balance_amount', 'rolling_total_daily_sales_count', 'rolling_total_daily_payouts_count', 'rolling_total_daily_adjustments_count', 'rolling_total_daily_failed_charge_count', 'rolling_total_daily_failed_charge_amount'] %} with account_partitions as ( From 58d7e84c1cd8c1d23ee0c6c055e966520a340266 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Thu, 16 Mar 2023 14:27:59 -0500 Subject: [PATCH 07/10] nvm materialize as table --- models/intermediate/int_stripe__account_running_totals.sql | 2 -- 1 file changed, 2 deletions(-) diff --git a/models/intermediate/int_stripe__account_running_totals.sql b/models/intermediate/int_stripe__account_running_totals.sql index c2799a71..4aa2da0e 100644 --- a/models/intermediate/int_stripe__account_running_totals.sql +++ b/models/intermediate/int_stripe__account_running_totals.sql @@ -1,5 +1,3 @@ -{{ config(materialized='view') }} - {% set rolling_fields = ['rolling_total_daily_sales_amount', 'rolling_total_daily_refunds_amount', 'rolling_total_daily_adjustments_amount', 'rolling_total_daily_other_transactions_amount', 'rolling_total_daily_gross_transaction_amount', 'rolling_total_daily_net_transactions_amount', 'rolling_total_daily_payout_fee_amount', 'rolling_total_daily_gross_payout_amount', 'rolling_daily_net_activity_amount', 'rolling_daily_end_balance_amount', 'rolling_total_daily_sales_count', 'rolling_total_daily_payouts_count', 'rolling_total_daily_adjustments_count', 'rolling_total_daily_failed_charge_count', 'rolling_total_daily_failed_charge_amount'] %} with account_partitions as ( From bb3a6e9a48f959fd326ccc337fb3d1963834dff7 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Thu, 16 Mar 2023 14:42:44 -0500 Subject: [PATCH 08/10] try with moving everything to daily overview --- .../int_stripe__account_running_totals.sql | 46 ------------------- models/stripe.yml | 5 +- models/stripe__daily_overview.sql | 44 ++++++++++++++++-- 3 files changed, 42 insertions(+), 53 deletions(-) delete mode 100644 models/intermediate/int_stripe__account_running_totals.sql diff --git a/models/intermediate/int_stripe__account_running_totals.sql b/models/intermediate/int_stripe__account_running_totals.sql deleted file mode 100644 index 4aa2da0e..00000000 --- a/models/intermediate/int_stripe__account_running_totals.sql +++ /dev/null @@ -1,46 +0,0 @@ -{% set rolling_fields = ['rolling_total_daily_sales_amount', 'rolling_total_daily_refunds_amount', 'rolling_total_daily_adjustments_amount', 'rolling_total_daily_other_transactions_amount', 'rolling_total_daily_gross_transaction_amount', 'rolling_total_daily_net_transactions_amount', 'rolling_total_daily_payout_fee_amount', 'rolling_total_daily_gross_payout_amount', 'rolling_daily_net_activity_amount', 'rolling_daily_end_balance_amount', 'rolling_total_daily_sales_count', 'rolling_total_daily_payouts_count', 'rolling_total_daily_adjustments_count', 'rolling_total_daily_failed_charge_count', 'rolling_total_daily_failed_charge_amount'] %} - -with account_partitions as ( - - select * - from {{ ref('int_stripe__account_partitions') }} -), - -final as ( - - select - account_id, - {{ dbt_utils.generate_surrogate_key(['account_id','date_day']) }} as account_daily_id, - - date_day, - date_week, - date_month, - date_year, - date_index, - source_relation, - coalesce(total_daily_sales_amount,0) as total_daily_sales_amount, - coalesce(total_daily_refunds_amount,0) as total_daily_refunds_amount, - coalesce(total_daily_adjustments_amount,0) as total_daily_adjustments_amount, - coalesce(total_daily_other_transactions_amount,0) as total_daily_other_transactions_amount, - coalesce(total_daily_gross_transaction_amount,0) as total_daily_gross_transaction_amount, - coalesce(total_daily_net_transactions_amount,0) as total_daily_net_transactions_amount, - coalesce(total_daily_payout_fee_amount,0) as total_daily_payout_fee_amount, - coalesce(total_daily_gross_payout_amount,0) as total_daily_gross_payout_amount, - coalesce(daily_net_activity_amount,0) as daily_net_activity_amount, - coalesce(daily_end_balance_amount,0) as daily_end_balance_amount, - coalesce(total_daily_sales_count,0) as total_daily_sales_count, - coalesce(total_daily_payouts_count,0) as total_daily_payouts_count, - coalesce(total_daily_adjustments_count,0) as total_daily_adjustments_count, - coalesce(total_daily_failed_charge_count,0) as total_daily_failed_charge_count, - coalesce(total_daily_failed_charge_amount,0) as total_daily_failed_charge_amount, - {% for f in rolling_fields %} - coalesce({{ f }}, - first_value({{ f }}) over (partition by {{ f }}_partition order by date_day rows unbounded preceding)) as {{ f }} - {%- if not loop.last -%},{%- endif -%} - {% endfor %} - - from account_partitions -) - -select * -from final \ No newline at end of file diff --git a/models/stripe.yml b/models/stripe.yml index b62e7b03..4c9831cb 100644 --- a/models/stripe.yml +++ b/models/stripe.yml @@ -9,10 +9,7 @@ models: - name: int_stripe__account_rolling_totals description: Each record represents each day's ending balances per account, in addition to changes over time. - - - name: int_stripe__account_running_totals - description: Each record represents each day's ending balances per account, changes over time, and daily running (cumulative) balances. - + - name: int_stripe__date_spine description: Each record represents a day of each calendar year. diff --git a/models/stripe__daily_overview.sql b/models/stripe__daily_overview.sql index eb06ca3a..4aa2da0e 100644 --- a/models/stripe__daily_overview.sql +++ b/models/stripe__daily_overview.sql @@ -1,8 +1,46 @@ -with final as ( +{% set rolling_fields = ['rolling_total_daily_sales_amount', 'rolling_total_daily_refunds_amount', 'rolling_total_daily_adjustments_amount', 'rolling_total_daily_other_transactions_amount', 'rolling_total_daily_gross_transaction_amount', 'rolling_total_daily_net_transactions_amount', 'rolling_total_daily_payout_fee_amount', 'rolling_total_daily_gross_payout_amount', 'rolling_daily_net_activity_amount', 'rolling_daily_end_balance_amount', 'rolling_total_daily_sales_count', 'rolling_total_daily_payouts_count', 'rolling_total_daily_adjustments_count', 'rolling_total_daily_failed_charge_count', 'rolling_total_daily_failed_charge_amount'] %} + +with account_partitions as ( select * - from {{ ref('int_stripe__account_running_totals') }} -) + from {{ ref('int_stripe__account_partitions') }} +), + +final as ( + + select + account_id, + {{ dbt_utils.generate_surrogate_key(['account_id','date_day']) }} as account_daily_id, + + date_day, + date_week, + date_month, + date_year, + date_index, + source_relation, + coalesce(total_daily_sales_amount,0) as total_daily_sales_amount, + coalesce(total_daily_refunds_amount,0) as total_daily_refunds_amount, + coalesce(total_daily_adjustments_amount,0) as total_daily_adjustments_amount, + coalesce(total_daily_other_transactions_amount,0) as total_daily_other_transactions_amount, + coalesce(total_daily_gross_transaction_amount,0) as total_daily_gross_transaction_amount, + coalesce(total_daily_net_transactions_amount,0) as total_daily_net_transactions_amount, + coalesce(total_daily_payout_fee_amount,0) as total_daily_payout_fee_amount, + coalesce(total_daily_gross_payout_amount,0) as total_daily_gross_payout_amount, + coalesce(daily_net_activity_amount,0) as daily_net_activity_amount, + coalesce(daily_end_balance_amount,0) as daily_end_balance_amount, + coalesce(total_daily_sales_count,0) as total_daily_sales_count, + coalesce(total_daily_payouts_count,0) as total_daily_payouts_count, + coalesce(total_daily_adjustments_count,0) as total_daily_adjustments_count, + coalesce(total_daily_failed_charge_count,0) as total_daily_failed_charge_count, + coalesce(total_daily_failed_charge_amount,0) as total_daily_failed_charge_amount, + {% for f in rolling_fields %} + coalesce({{ f }}, + first_value({{ f }}) over (partition by {{ f }}_partition order by date_day rows unbounded preceding)) as {{ f }} + {%- if not loop.last -%},{%- endif -%} + {% endfor %} + + from account_partitions +) select * from final \ No newline at end of file From 482ac34300b2e65aaf75e3dd047e4698952cb879 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Sun, 19 Mar 2023 16:40:09 -0600 Subject: [PATCH 09/10] add test update --- models/stripe.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/models/stripe.yml b/models/stripe.yml index 4c9831cb..1a03769b 100644 --- a/models/stripe.yml +++ b/models/stripe.yml @@ -402,6 +402,7 @@ models: tests: - dbt_utils.unique_combination_of_columns: combination_of_columns: + - account_id - date_day - source_relation columns: From e248165a09f586389324d8a026c506d945191d53 Mon Sep 17 00:00:00 2001 From: fivetran-reneeli Date: Sun, 19 Mar 2023 16:53:15 -0600 Subject: [PATCH 10/10] updates --- CHANGELOG.md | 5 ++--- README.md | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b503001..ad5419b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,11 @@ # dbt_stripe v0.10.0 [#60](https://github.com/fivetran/dbt_stripe/pull/60) includes the following changes: ## 🚨 Breaking Changes 🚨: -- Introduces a `int_stripe__account_running_totals` model to alleviate runtime errors resulting from the `stripe__daily_overview` model exceeding disc capacity upon running. +- Unwrapped `total_*` fields from the for loop in `stripe__daily_overview` to reduce compute required for previous for-loops - Add `account_id` in `int_stripe__account_rolling_totals` for use as part of the join in the case where more than 1 `account_id` exists. ## Under the Hood -- The previous logic from `stripe__daily_overview` has been moved to the intermediate `int_stripe__account_running_totals` model to help optimize runtime. -- Intermediate model materializations have changed from ephemeral to table to help with the complexity of calculations. +- Intermediate model materializations have changed from ephemeral to table to reduce the compute required for the complexity of calculations. # dbt_stripe v0.9.0 diff --git a/README.md b/README.md index babcd576..d05518bc 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ Include the following stripe package version in your `packages.yml` file: ```yaml packages: - package: fivetran/stripe - version: [">=0.9.0", "<0.10.0"] + version: [">=0.10.0", "<0.11.0"] ``` ## Step 3: Define database and schema variables