Releases: fivetran/dbt_stripe_source
v0.13.0 dbt_stripe_source
PR #87 includes the following updates:
Feature Updates: Optionally Convert Amounts to Major Units
Stripe passes amount-based fields, such as amount
, net
, and fee
, in the smallest denomination as raw form. This means, if your currency has minor and major units such as USD, 100 represents 100 cents, the minor unit, or 1 USD, the major unit. Alternatively, if your currency doesn't use minor units such as JPY, 100 represents 100 JPY.
- This PR introduces a variable
stripe__convert_values
(false
by default) which allows users the option to divide all amount-based fields by 100.- For information on how to enable the division, refer to the README on configuring the
stripe__convert_values
variable. - Otherwise, amount-based fields will be brought through in their raw form.
- Examples of currencies using minor units (in which enabling
stripe__convert_values
is relevant) include United States Dollar (USD), Euro (EUR), and the Canadian Dollar (CAD). - Examples of currencies NOT using minor units (in which it makes more sense to keep the amount-based fields in raw form) include Japanese Yen (JPY), Indonesian Rupiah (IDR), and Korean Won (KRW).
- For information on how to enable the division, refer to the README on configuring the
Under the Hood
- Introduces the
convert_values
macro which contains the logic for enabling the division by 100, referenced by all amount-based fields. - Updates the
run_models.sh
script to test for whenstripe__convert_values
is set to True.
Notes
- This update is not providing multiple currency support; however, we're interested in exploring this functionality if there's a need. As such, we have created a feature request to support multiple currencies where you are welcome to provide feedback or contribute to the discussion.
Documentation
- Updates the descriptions for all amount-based fields to specify the grain of the values and add information about the
stripe__convert_values
variable. - Corrected references to connectors and connections in the README. (#88)
Full Changelog: v0.12.1...v0.13.0
v0.12.1 dbt_stripe_source
Feature Updates
- Declaration of passthrough variables for the
stg_stripe__card
model. This can, for example, be used to pull in non-standard columns from Stripe such asdescription
,iin
andissuer
. See the README for more details (PR #81).
# dbt_project.yml
vars:
stripe_source:
card_pass_through_columns:
- name: "description"
- name: "iin"
- name: "issuer"
alias: "card_issuer" # optional: define an alias for the column
transform_sql: "cast(card_issuer as string)" # optional: apply transformation to column. must reference the alias if provided
Under the Hood
- Removed un-used columns from the
get_card_columns()
macro and aliased themetadata
field, which is parsed via thestripe__card_metadata
variable, but not included as a field in its entirety instg_stripe__card
by default (PR #83).- This ensures users can utilize the new
card_pass_through_columns
variable to include these fields instg_stripe__card
.
- This ensures users can utilize the new
Contributors
Full Changelog: v0.12.0...v0.12.1
v0.12.0 dbt_stripe_source
[PR #77] includes the following updates:
Feature Updates
- Addition of the following new staging models and accompanying upstream references:
stg_stripe__discount
(required for downstreamdbt_stripe
model transformations)stg_stripe__product
(enabled by default, but can be disabled by setting thestripe__using_subscriptions
variable tofalse
)
Full Changelog: v0.11.1...v0.12.0
v0.11.1 dbt_stripe_source
[PR #74] includes the following updates:
Bug Fix
- Removes the
unique_invoice_line_item_id
uniqueness test instg_stripe__invoice_line_item
. This is becauseunique_invoice_line_item_id
(unique_id
in the raw sourceinvoice_line_item
table) was part of an older version of Stripe that was brought forth to help migrate internal references. See the Stripe API update for more information. The Fivetran connector persists this in order to resolve the pagination break issue for invoice line items that was introduced by the API update.- Furthermore the column definition for
unique_invoice_line_item_id
(unique_id
in the raw sourceinvoice_line_item
table) has been made more specific:"A unique id generated and only for old invoice line item ID's from a past version of the API. The introduction of this field resolves the pagination break issue for invoice line items, which was introduced by the Stripe API update."
- Furthermore the column definition for
Full Changelog: v0.11.0...v0.11.1
v0.11.0 dbt_stripe_source
PR #72 includes the following updates:
🚨 Breaking Changes 🚨
- No longer filters out deleted customers in
stg_stripe__customer
.- 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
stg_stripe__customer
(and the downstream transformstripe__customer_overview
model).
- Persists
Feature Updates
- Adds the
phone
column tostg_stripe__customer
.
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.10.0...v0.11.0
v0.10.0 dbt_stripe_source
PR #68 includes the following updates:
Updates
- Adds the
dispute
andtransfer
objects and respective staging models.
Full Changelog: v0.9.3...v0.10.0
v0.9.3 dbt_stripe_source
Under the Hood:
- PR #67 moves the live_mode predicate to the non *_tmp staging models.
- This move is necessary due to the 0.4.3 release of fivetran_utils, which infers if the source table a package is present, and if not the package will create an empty table to ensure the downstream transformations succeed. Previously the Stripe package wasn't compatible because of where the live_mode predicate existed. In the case there will be an empty data model created, we needed to move the predicate so that the queries and downstream models will still run correctly.
- PR #66 incorporates the new
fivetran_utils.drop_schemas_automation
macro into the end of each Buildkite integration test job and updates the pull request templates.
v0.9.2 dbt_stripe_source
PR #64 includes the following updates:
Bug Fixes
- The
stg_stripe__fee
uniqueness test has been updated to also consider theindex
when determining the unique combination of columns. As there may be many indexes to a single fee, the uniqueness test has been updated to account for this scenario.
Contributors
Full Changelog: v0.9.1...v0.9.2
v0.9.1 dbt_stripe_source
PR #61 includes the following updates:
Feature Updates
- Included the metadata pivot functionality for the
card
andinvoice_line_item
staging models using the respectivestripe__card_metadata
andstripe__invoice_line_item_metadata
variables.
Contributors
Full Changelog: v0.9.0...v0.9.1
v0.9.0 dbt_stripe_source
PR #59 contains the following changes:
🚨 Breaking Changes 🚨
- Variable names have been updated to contain the
stripe
prefix, allowing you to configure global variables while only affecting the Stripe package.
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 |
stg_stripe__plan
has been changed tostg_stripe__price_plan
. Following Stripe's migration from thePlan
object to thePrice
object (Stripe doc here.), we have added a new variablestripe__using_price
and macrodoes_table_exist
that checks if theprice
table exists. This package usesprice
by default if it exists. However, if you still have and wish to keep usingplan
, you can setstripe__using_price
to False. For more please see the READMEstripe__plan_metadata
variable has been renamed tostripe__price_plan_metadata
- Stripe connectors set up after February 09, 2022 will use the
subscription_history
table, as they will no longer be syncing thesubscription
table. This package usessubscription_history
by default if it exists. However, if you still have thesubscription
table and wish to use it instead, then set thestripe__using_subscription_history
to False.
🎉 Feature Updates 🎉:
- Added the Union ability to allow for multiple Stripe connectors. The new
source_relation
column in each staging model will specify where each record comes from. For more information please see the README #33 - Added new
price
source table in addition to newstripe__using_price
variable. Stripe migrated the Plan API to Price API (for more information, refer to their docs) so we recommend using the price table. Thestripe__using_price
variable anddoes_table_exist
macro checks to see if you are indeed using theprice
table. If you plan on using theplan
table instead you may toggle this to False. For more information on how to configure, refer to the README. - Added additional fields to the following models:
stg_stripe__charge
,stg_stripe__invoice
,stg_stripe__invoice_line_item
,stg_stripe__payment_method_card
,stg_stripe__refund
,stg_stripe__subscription
.
For more please see the README
Full Changelog: v0.8.0...v0.9.0