Skip to content

Releases: fivetran/dbt_stripe

v0.15.0 dbt_stripe

03 Oct 00:25
7cfdfc5
Compare
Choose a tag to compare

Breaking Changes

  • Updated stripe__balance_transactions to correctly handle multiple disputes on the same transaction:
    • Adjusted customer_facing_amount to reflect the dispute_amount of the latest dispute (if the transaction is not a charge or refund and is associated with any disputes) (PR #92).
    • Added the following the dispute-related columns (PR #92):
      • latest_dispute_amount_won: Latest disputed amount that was won in favor of the merchant.
      • latest_dispute_amount_lost: Latest disputed amount that was lost and returned to the customer.
      • latest_dispute_amount_under_review: Latest disputed amount that is currently under review by the bank.
      • latest_dispute_amount_needs_response: Latest disputed amount that currently needs a response (the dispute has been filed but the merchant has not yet responded with evidence).
      • latest_dispute_amount_warning_closed: Latest disputed amount that is currently of status warning_under_closed (early fraud warning being closed due to no formal dispute).
      • latest_dispute_amount_warning_under_review: Latest disputed amount that is currently of status warning_under_review (card issuer suspects possible fraud but hasn't yet escalated the situation to a full dispute).
      • latest_dispute_amount_warning_needs_response: Latest disputed amount that is currently of status warning_needs_response (early fraud warning has been escalated into formal dispute and/or card issuer has requested more information).
      • dispute_count: Count of disputes raised against this transaction. If > 1, join in dispute data for additional information on each dispute.
    • Adjusted the dispute_id and dispute_reason fields to aggregate together data from multiple disputes if present. They have been renamed to dispute_ids and dispute_reasons in the following models (PR #88):
      • stripe__balance_transactions
      • stripe__activity_itemized_2
      • stripe__balance_change_from_activity_itemized_3
      • stripe__ending_balance_reconciliation_itemized_4

Under the Hood

  • Updated dispute seed data to test the above changes (PR #92).
  • Added additional validation tests on the affected models from above (PR #92).

Contributors

Full Changelog: v0.14.1...v0.15.0

v0.14.1 dbt_stripe

25 Sep 19:21
e2677a5
Compare
Choose a tag to compare

PR #89 includes the following updates:

Bug Fixes

  • Addressed a potential Divide by 0 error in calculating unit_amount in the stripe__line_item_enhanced model. Now, if the denominator invoice_line_item.quantity is 0, unit_amount will also be 0.

Under the Hood

  • Expanded the consistency_line_item_enhanced_count test to also validate potential changes to unit_amount sums.
  • Adjusted the invoice_line_item seed data to include cases where quantity = 0 in order to test the above bug fix.

Full Changelog: v0.14.0...v0.14.1

v0.14.0 dbt_stripe

14 Aug 19:55
a912d17
Compare
Choose a tag to compare

PR #82 includes the following updates:

Feature Updates

  • Addition of the stripe__line_item_enhanced model. This model constructs a comprehensive, denormalized analytical table that enables reporting on key revenue, subscription, customer, and product metrics from your billing platform. It’s designed to align with the schema of the *__line_item_enhanced model found in Stripe, Recharge, Recurly, Shopify, and Zuora, offering standardized reporting across various billing platforms. To see the kinds of insights this model can generate, explore example visualizations in the Fivetran Billing Model Streamlit App. Visit the app for more details.
    • This model is currently disabled by default. You may enable it by setting the stripe__standardized_billing_model_enabled as true in your dbt_project.yml.

Relevant Upstream Updates (dbt_stripe_source v0.12.0)

  • Addition of the following new staging models and accompanying upstream references:
    • stg_stripe__discount (required for downstream dbt_stripe model transformations)
    • stg_stripe__product (enabled by default, but can be disabled by setting the stripe__using_subscriptions variable to false)

Under the Hood

  • Added consistency test within integration_tests for the stripe__line_item_enhanced model.
  • Updated the quickstart.yml to include the product source table as a requirement for the stripe__using_subscriptions variable.

Full Changelog: v0.13.0...v0.14.0

v0.13.0 dbt_stripe

28 May 13:12
2f792bb
Compare
Choose a tag to compare

PR #78 includes the following updates:

🚨 Breaking Changes 🚨

  • Renamed folder stripe_reports to stripe_financial_reports to be more descriptive of the contents.
    • ⚠️ If you are using folder names to scope out configs, runs, etc., you will need to update the folder name.

Bug fixes

  • Updated model int_stripe__date_spine to accommodate cases when model stripe__balance_transactions has no records.
    • Previously, the date spine relied on stripe__balance_transactions to set date bounds, which caused errors if empty. Now, the model defaults to a one-month range in such cases.

Under the hood

  • Updated structure of model int_stripe__date_spine for improved performance and maintainability.

Full Changelog: v0.12.0...v0.13.0

v0.12.0 dbt_stripe

06 Mar 18:05
f98e84d
Compare
Choose a tag to compare

PR #75 includes the following updates:

🚨 Breaking Changes 🚨

  • No longer filters out deleted customers in stripe__customer_overview.
    • Persists is_deleted field to differentiate between deleted and active customers.
    • Note that this is a 🚨 breaking change 🚨, as previously filtered-out records will appear in stripe__customer_overview.

Feature Updates

  • Adds the phone column to stripe__customer_overview.

Under the Hood

  • Included auto-releaser GitHub Actions workflow to automate future releases.
  • Updated the maintainer PR template to resemble the most up to date format.

Full Changelog: v0.11.0...v0.12.0

v0.11.0 dbt_stripe

18 Oct 22:40
Compare
Choose a tag to compare

PR #69 contains the following updates:

🚨 Breaking Changes 🚨

  • Prefixed the following fields based on their corresponding upstream source to maintain clarity:
Previous Name New Name
created_at balance_transaction_created_at
available_on balance_transaction_available_on
currency balance_transaction_currency
amount balance_transaction_amount
fee balance_transaction_fee
net balance_transaction_net
type balance_transaction_type
source balance_transaction_source_id
reporting_category balance_transaction_reporting_category
description balance_transaction_description

Updates

  • Introduced the following new models, named after the Stripe reports that they follow. These models help reproduce reports available in the Stripe Reporting API. The reports introduced in this update include:

    • stripe__activity_itemized_2
    • stripe__balance_change_from_activity_itemized_3
    • stripe__ending_balance_reconciliation_itemized_4
    • stripe__payout_itemized_3
  • Updated the stripe__balance_transactions with the following changes:

    • reporting_category has been updated to pull directly from the titular column. If no reporting_category exists, it then falls to sort based on balance transaction type in accordance to the Stripe documentation.
    • Added the following fields:
      • dispute fields
      • transfer fields
      • additional payout fields
      • additional customer fields
      • additional card fields
      • additional charge fields
      • additional invoice fields
    • Updated customer_facing_amount to include for refunds and disputes as well
    • Updated charge_id to charge, refund, then dispute objects consecutively

Under the Hood

  • Incorporated the new fivetran_utils.drop_schemas_automation macro into the end of each Buildkite integration test job.
  • Updated the pull request templates.

Full Changelog: v0.10.1...v0.11.0

v0.10.1 dbt_stripe

05 Apr 19:18
1f01985
Compare
Choose a tag to compare

PR #61 contains the following changes:

Documentation Updates

  • Updated the Metadata pivot documentation to be more clear that these variables only affect the dbt_stripe_source staging models.
  • Added reference to the new stripe__card_metadata and stripe__invoice_line_item_metadata metadata variables that are available in the latest source package update.

Under the Hood

  • Updated the card and invoice_line_item seed files to be consistent with the source package versions. Specifically to include the metadata fields.
  • Added a new BuildKite run statement to test a few of the metadata variables.

Full Changelog: v0.10.0...v0.10.1

v0.10.0 dbt_stripe

21 Mar 20:11
Compare
Choose a tag to compare

PR #60 includes the following changes:

🚨 Breaking Changes 🚨:

  • 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

  • Intermediate model materializations have changed from ephemeral to table to reduce the compute required for the complexity of calculations.

v0.9.0 dbt_stripe

31 Jan 17:06
Compare
Choose a tag to compare

#56 includes the following changes:

🚨 Breaking Changes 🚨:

  • stripe__subscription_line_items has been removed. To recreate it, simply filter stripe__invoice_line_items for where subscription_id is not null.
  • The stripe__weekly_overview, stripe__quarterly_overview, and stripe__monthly_overview models have been removed as they can be recreated directly from the stripe__daily_overview by rolling up the date grain.
  • The stripe__invoice_line_item and stripe__subscription_line_items have been renamed to stripe__invoice_line_item_details and stripe__subscription_details.
  • Following the addition of the new pricing source table which may replace the plan table depending on whether you migrated to the Price API (Stripe doc here.), the following columns in stripe__invoice_line_items have been updated. This package will draw the respective columns from the price object by default if it exists. However, if you still have and wish to keep using plan, you can set stripe__using_price to False. For more please see the README
Previous Name New Name
plan_is_active price_plan_is_active
plan_amount price_plan_amount
plan_interval price_plan_interval
plan_interval_count price_plan_interval_count
plan_nickname price_plan_nickname
plan_product_id price_plan_product_id
  • In addition, stripe__plan_metadata variable has been renamed to stripe__price_plan_metadata

  • Variables have been prefixed with stripe__ so they can be used globally.

Previous Name New Name
using_invoices stripe__using_invoices
using_credit_notes stripe__using_credit_notes
using_payment_method stripe__using_payment_method
using_livemode stripe__using_livemode
using_invoice_line_sub_filter stripe__using_invoice_line_sub_filter
using_subscriptions stripe__using_subscriptions
using_subscription_history stripe__using_subscription_history
using_price stripe__using_price
  • In the stripe__subscription_details model, start_date has been updated to start_date_at to follow our standard naming practices.

🎉 Feature Updates 🎉

  • Introducing the new model stripe__invoice_details.
  • Updated the models stripe__daily_overview with additional daily and rolling metrics.
  • subscription_item_id has been added to the stripe__invoice_line_items model.
  • Added the ability to union datasets across different schemas or databases. A new column populating each model called source_relation will specify the source of each record.

For more information please refer to the README and stripe.yml

Full CHANGELOG: v0.8.0...v0.9.0

dbt_strirpe v0.8.0

04 Jan 00:55
3949924
Compare
Choose a tag to compare

🚨 Breaking Changes 🚨:

PR #48 includes the following breaking changes:

  • Dispatch update for dbt-utils to dbt-core cross-db macros migration. Specifically {{ dbt_utils.<macro> }} have been updated to {{ dbt.<macro> }} for the below macros:
    • any_value
    • bool_or
    • cast_bool_to_text
    • concat
    • date_trunc
    • dateadd
    • datediff
    • escape_single_quotes
    • except
    • hash
    • intersect
    • last_day
    • length
    • listagg
    • position
    • replace
    • right
    • safe_cast
    • split_part
    • string_literal
    • type_bigint
    • type_float
    • type_int
    • type_numeric
    • type_string
    • type_timestamp
    • array_append
    • array_concat
    • array_construct
  • For current_timestamp and current_timestamp_in_utc macros, the dispatch AND the macro names have been updated to the below, respectively:
    • dbt.current_timestamp_backcompat
    • dbt.current_timestamp_in_utc_backcompat
  • Dependencies on fivetran/fivetran_utils have been upgraded, previously [">=0.3.0", "<0.4.0"] now [">=0.4.0", "<0.5.0"].
  • Updated README to include instructions on how to use metadata variable in cases of dictionary arguments. (#51)