Releases: fivetran/dbt_stripe_source
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
dbt_stripe_source v0.8.0
🚨 Breaking Changes 🚨:
PR #52 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
andcurrent_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
dbt_utils.surrogate_key
has also been updated todbt_utils.generate_surrogate_key
. Since the method for creating surrogate keys differ, we suggest all users do afull-refresh
for the most accurate data. For more information, please refer to dbt-utils release notes for this update.- 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. (#57)