Releases: fivetran/dbt_stripe
v1.7.0 dbt_stripe
PR #147 includes the following updates:
Under the Hood
- Updates
stripe__subscription_item_mrr_reportto cap the MRR date spine at the end of the current month instead of deriving it from the maximumcurrent_period_endacross all subscriptions. Becausecurrent_period_endis a future timestamp for active subscriptions, the previous approach generated rows for months that have not yet occurred. The model now reflects only months up to and including the current month. See the DECISIONLOG for more details.
Bug Fix
- Fixes a bug affecting a small number of customers due to the
stripe__customer_metadatavariable being erroneously included in thedbt_utils.starexception list of thecustomer_transactions_overviewCTE ofstripe__customer_overview. When thestripe__customer_metadatawas enabled, it had the potential to cause model run failures due to column-count mismatches with union all branch.
Full Changelog: v1.6.1...v1.7.0
v1.6.1 dbt_stripe
PR #144 includes the following update:
Bug Fix
- Updates the
subscription_discountsource column reference fromcheckout_session_idtocheckout_sessionto match the raw Stripe source naming convention. The output column namecheckout_session_idis preserved as an alias in the staging layer, so there is no downstream impact.
Full Changelog: v1.6.0...v1.6.1
v1.6.0 dbt_stripe
PR #141 includes the following updates:
Schema/Data Changes
3 total changes • 0 possible breaking changes
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
stripe__subscription_item_mrr_report |
Changed data | Discount sourced from discount table |
Discount sourced from subscription_discount table |
Affects discount-based MRR calculations for subscriptions with active coupons. |
stg_stripe__subscription_discount |
New Staging Model | Staging model for subscription discount data. This table is enabled by default, and can be disabled via variable configurability. See the README for more details. | ||
stg_stripe__subscription_discount_tmp |
New Temp Model |
Bug Fixes
- Removes
convert_valuesmacro fromamountcalculation instripe__subscription_item_mrr_report. The macro is already applied at the staging layer and applying it to the metric calculation was causing a double conversion, leading to potential undercalculation of MRR values whenstripe__convert_valueswas set to true. - Adds
convert_valuesmacro toamount_offfield value instg_stripe__coupontable to ensure correct conversion of discounted amount when customers have the variable set to true.
Under the Hood
- Updates
int_stripe__subscription_discountto source from thesubscription_discounttable via the newstg_stripe__subscription_discountstaging model, instead of sourcing from thediscounttable viastg_stripe__discount. - Adds integration test seed files
subscription_discount_data.csv,subscription_discount_data_snowflake.csv, andsubscription_discount_data_postgres.csv.
Full Changelog: v1.5.0...v1.6.0
v1.6.0-a1 dbt_stripe
PR #141 is a pre-release that includes the following updates:
Schema/Data Change
2 total changes • 0 possible breaking changes
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
stg_stripe__subscription_discount |
New Staging Model | Staging model for subscription discount data. | ||
stg_stripe__subscription_discount_tmp |
New Temp Model |
Under the Hood
- Updates
int_stripe__subscription_discountto source from theSUBSCRIPTION_DISCOUNTtable via the newstg_stripe__subscription_discountstaging model, instead of sourcing from theDISCOUNTtable viastg_stripe__discount. - Updates
stripe__subscription_item_mrr_reportto incorporate discount data from theSUBSCRIPTION_DISCOUNTtable rather than theDISCOUNTtable. - Adds integration test seed files
subscription_discount_data.csv,subscription_discount_data_snowflake.csv, andsubscription_discount_data_postgres.csv.
Full Changelog: v1.5.0...v1.6.0-a1
v1.5.0 dbt_stripe
Schema Changes
2 total changes • 1 possible breaking change
| Data Model | Change type | Old | New | Notes |
|---|---|---|---|---|
| All models | Single-connection source_relation value |
Empty string ('') |
<stripe_database>.<stripe_schema> |
|
stg_stripe__coupon |
New column | metadata |
optional custom JSON field |
Feature Updates
- Adds configurable table variables
stripe__using_transfersandstripe__using_payouts, which are set to true by default. For dbt Core users, See the README for more details on how to disable these variables.stripe__using_transfersdisables the Transfers source and any relevant downstream components.stripe__using_payoutsdisables both the Payouts and Payout Balance Transactions sources, along with any related downstream components.
- Introduces support for the newer, more flexible unioning framework. Previously, to run the package on multiple Stripe sources at once, you could only use the
union_schemasvariable ORunion_databases(mutually exclusive). While these setups are still supported for backwards compatibility, we recommend usingstripe_sourcesinstead. See the README for more details.
# dbt_project.yml
vars:
stripe:
stripe_sources:
- database: connection_1_destination_name # Required
schema: connection_1_schema_name # Required
name: connection_1_source_name # Required only if following this step: https://github.com/fivetran/dbt_stripe/blob/main/README.md#recommended-incorporate-unioned-sources-into-dag
- database: connection_2_destination_name
schema: connection_2_schema_name
name: connection_2_source_name- Updates end models (
stripe__balance_transactions,stripe__customer_overview,stripe__invoice_details,stripe__invoice_line_item_details,stripe__subscription_details) to dynamically include metadata fields from staging models when metadata variables are configured. See the README for more details.
Quickstart Updates
- Creates table variables for sources
transfer,payout, andpayout_balance_transaction. These source tables must be selected in the Fievetran connector UI for the variables to be set to True and the dependent models to be run. - Adds
stripe__charge_metadata,stripe__invoice_metadata, andstripe__subscription_metadatatosupported_varsas optional properties to be pivoted into columns in various end models. These variables can be configured directly through thesupportedVarssection in the Quickstart UI.
Under the Hood
- Updates all tmp staging models to conditionally use either the new
stripe_union_connectionsmacro (whenstripe_sourcesis configured) or the legacyfivetran_utils.union_datamacro (for backward compatibility). - Updates all staging models to use the new
stripe.apply_source_relation()macro instead offivetran_utils.source_relation(). - Adds
stripe.select_metadata_columns()macro to handle both dictionary and alias variable metadata inputs. - Adds
metadatacolumn toget_coupon_columns()macro andcoupon_data.csvseed file. - Updates integration test seed data for customer and invoice tables.
Full Changelog: v1.4.0...v1.5.0
v1.4.0 dbt_stripe
PR #138 includes the following updates:
Schema/Data Change
3 total change • 0 possible breaking changes
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
stripe__subscription_item_mrr_report |
New End Model | Each record represents a subscription item for a given month with MRR metrics for both contract and billed/net mrr, movement classification, and monthly discounts applied. Tracks MRR changes over time, classifying each month as new, expansion, contraction, churned, reactivation, or unchanged. If you notice any discrepencies in MRR calculations with this new model, please open up a support ticket. | ||
stg_stripe__coupon |
New Staging Model | Staging model for Stripe coupon data. | ||
stg_stripe__coupon_tmp |
New Temp Model | |||
stg_stripe__price_plan |
Datatype casts | recurring_interval field as stringrecurring_interval_count field as integerprice_plan_id field as string |
Avoids datatype errors. | |
stg_stripe__subscription_item |
Datatype casts | plan_id field as string |
Avoids datatype errors. |
Feature Update
- Adds new analyses folder with advanced revenue reporting:
stripe__arr_snapshot_analysis: Generates a high-level ARR snapshot report for the entire business for revenue forecasting.stripe__customer_mrr_analysis: Generates an MRR report at the customer level for retention reporting and cohort analysis.- These analysis files reference the
stripe__subscription_item_mrr_reportmodel and can be compiled usingdbt compileand executed directly in your data warehouse.
Documentation
- Adds comprehensive column documentation for
stripe__subscription_item_mrr_reportinstripe.yml. - Adds README in the analysis folder with instructions on how to compile and use the analysis SQL.
Under the Hood
- Adds consistency test for
stripe__subscription_item_mrr_reportmodel. - Updates
integration_tests/seeds/price_data.csvwith additional test data. - Adds
stripe__subscription_item_mrr_reportmodel to quickstart.yml public models list.
Full Changelog: v1.3.0...v1.4.0
v1.3.0 dbt_stripe
PR #139 includes the following updates:
Documentation
- Updates README with standardized Fivetran formatting.
Under the Hood
- In the
quickstart.ymlfile:- Adds
table_variablesfor relevant sources to prevent missing sources from blocking downstream Quickstart models. - Adds
supported_varsfor Quickstart UI customization.
- Adds
Full Changelog: v1.2.0...v1.3.0
v1.3.0-a4 dbt_stripe
PR #138 includes the following update:
Under the Hood
- Removes dependency on
int_stripe__date_spinefromstripe__subscription_item_mrr_reportso users do not need to have the account table enabled to use the MRR report. - Explicitly casts
recurring_intervalfield as string to avoid datatype errors.
Full Changelog: v1.3.0-a3...v1.3.0-a4
v1.3.0-a3 dbt_stripe
PR #138 includes the following updates:
Under the Hood
- Adds docs.
Full Changelog: v1.3.0-a2...v1.3.0-a3
v1.3.0-a2 dbt_stripe
PR #138 includes the following updates:
Under the Hood
- Adds
stripe__subscription_item_mrr_reportmodel to quickstart.yml public models list.
Full Changelog: v1.3.0-a1...v1.3.0-a2