-
Notifications
You must be signed in to change notification settings - Fork 40
Feature/new union macro metadata fields and variable configs #140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 45 commits
4c6bbef
ecf0a8e
9fdebec
30a7a52
41b2a9b
aa8992c
5909cde
0ebd3b3
6a73071
9e78db2
6276501
d99a38c
33775f9
6aca2b5
893cb47
3d4bafd
2eca5b8
20a289a
a20ba3d
9fd63b2
81e4914
3c6b49f
a63f8ae
b261218
fc48a1f
4e7276c
eb0b847
037132d
388e289
89a843f
87d5a6e
a896abd
14c9fae
385f4dd
90ee3d2
1dd6061
73e539d
dc330d3
49688cd
b6fa2ec
80eaf64
f7fc894
55d143e
d9ee75b
850761c
a65fc5f
b010bba
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
fivetran-savage marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,45 @@ | ||
| # dbt_stripe v1.5.0 | ||
|
|
||
| ## 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>` | | | ||
|
fivetran-savage marked this conversation as resolved.
|
||
| | `stg_stripe__coupon` | New column | | `metadata` | optional custom JSON field | | ||
|
|
||
| ## Feature Updates | ||
| - Adds configurable table variables `stripe__using_transfers` and `stripe__using_payouts`, which are set to true by default. For dbt Core users, [See the README](https://github.com/fivetran/dbt_stripe?tab=readme-ov-file#disable-models-for-non-existent-sources) for more details on how to disable these variables. | ||
| - `stripe__using_transfers` disables the Transfers source and any relevant downstream components. | ||
| - `stripe__using_payouts` disables 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_schemas` variable OR `union_databases` (mutually exclusive). While these setups are still supported for backwards compatibility, we recommend using `stripe_sources` instead. See the [README](https://github.com/fivetran/dbt_stripe/blob/main/README.md#option-b-union-multiple-connections) for more details. | ||
|
|
||
|
fivetran-savage marked this conversation as resolved.
|
||
| ```yml | ||
| # 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](https://github.com/fivetran/dbt_stripe/blob/main/README.md#pivoting-out-metadata-properties) for more details. | ||
|
|
||
| ## Quickstart Updates | ||
| - Creates table variables for sources `transfer`,`payout`, and `payout_balance_transactions`. 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. | ||
|
fivetran-savage marked this conversation as resolved.
Outdated
|
||
| - Adds `stripe__charge_metadata`, `stripe__invoice_metatdata`, and `stripe__subscription_metadata` to `supported_vars` as optional properties to be pivoted into columns in various end models. These variables can be configured directly through the `supportedVars` section in the Quickstart UI. | ||
|
fivetran-savage marked this conversation as resolved.
Outdated
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There were significant changes made to Quickstart, let's add an additional section below Feature Updates documenting those changes.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added. Let me know what you think. |
||
| ## Under the Hood | ||
| - Updates all tmp staging models to conditionally use either the new `stripe_union_connections` macro (when `stripe_sources` is configured) or the legacy `fivetran_utils.union_data` macro (for backward compatibility). | ||
| - Updates all staging models to use the new `stripe.apply_source_relation()` macro instead of `fivetran_utils.source_relation()`. | ||
|
fivetran-savage marked this conversation as resolved.
|
||
| - Adds `stripe.select_metadata_columns()` macro to handle both dictionary and alias variable metadata inputs. | ||
| - Adds `metadata` column to `get_coupon_columns()` macro and `coupon_data.csv` seed file. | ||
|
fivetran-savage marked this conversation as resolved.
|
||
| - Updates integration test seed data for customer and invoice tables. | ||
|
|
||
| # dbt_stripe v1.4.0 | ||
| [PR #138](https://github.com/fivetran/dbt_stripe/pull/138) includes the following updates: | ||
|
|
||
|
|
@@ -423,8 +465,6 @@ Stripe passes amount-based fields, such as `amount`, `net`, and `fee`, in the sm | |
| - 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. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.