Skip to content
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

Stripe updates #59

Merged
merged 133 commits into from
Jan 31, 2023
Merged
Show file tree
Hide file tree
Changes from 123 commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
4780704
updatees to existing stg
fivetran-reneeli Nov 22, 2022
bd39b54
add columnss to existing models
fivetran-reneeli Nov 23, 2022
b4bfaaf
add fields to macros
fivetran-reneeli Nov 23, 2022
072147a
add fields to payment method card stf
fivetran-reneeli Nov 23, 2022
910dbfb
add new table sources
fivetran-reneeli Nov 23, 2022
a39bb00
add new column desc to src yml
fivetran-reneeli Nov 23, 2022
ff69c83
additions to stg yml
fivetran-reneeli Nov 23, 2022
5dd8da1
update vars to global stripe vars
fivetran-reneeli Nov 23, 2022
0e5984b
add price plan source var
fivetran-reneeli Nov 23, 2022
3ce0d6a
price plan toggle
fivetran-reneeli Nov 26, 2022
9f87c10
change default to subscription history
fivetran-reneeli Nov 28, 2022
1944ca4
trying adding price and plan logic
fivetran-reneeli Nov 28, 2022
0fb3bf0
add status_transition child objects to invoice
fivetran-reneeli Nov 28, 2022
c8cc752
add three_d_secure obhects to payment method card
fivetran-reneeli Nov 28, 2022
8bbb7f0
add pause colleciton object to subscription
fivetran-reneeli Nov 28, 2022
08f5fc3
fix names in get paymenthod card columns
fivetran-reneeli Nov 28, 2022
9ec0665
add new column defs to yml
fivetran-reneeli Nov 28, 2022
82571b1
comment out empty fields for now
fivetran-reneeli Nov 29, 2022
4d805af
fix formatting and syntax errors
fivetran-reneeli Nov 29, 2022
6225994
fix pricing model jinja errors
fivetran-reneeli Nov 29, 2022
98498fe
pricing model
fivetran-reneeli Nov 29, 2022
5e3a557
add union data feature
fivetran-reneeli Nov 29, 2022
a0ff31c
add union feature
fivetran-reneeli Nov 29, 2022
f6d6d80
put union in select clause so livemode macro works
fivetran-reneeli Nov 29, 2022
78f9359
fix rest of formatting, add args in src relation
fivetran-reneeli Nov 30, 2022
757cc63
fix source relation column
fivetran-reneeli Nov 30, 2022
b95699c
try alias fix
fivetran-reneeli Nov 30, 2022
6030a83
add seed price data
fivetran-reneeli Nov 30, 2022
8be67bb
add alias to select stmt
fivetran-reneeli Nov 30, 2022
0641063
whoops forgot alias
fivetran-reneeli Nov 30, 2022
ce565d8
update column names
fivetran-reneeli Nov 30, 2022
5156383
fix timestamp
fivetran-reneeli Nov 30, 2022
28fe92e
update column in yml
fivetran-reneeli Nov 30, 2022
c15ff29
add vars to run sh
fivetran-reneeli Nov 30, 2022
79c84ba
finish ymls
fivetran-reneeli Dec 1, 2022
1eda948
update conditional
fivetran-reneeli Dec 1, 2022
a38c07b
updatees to existing stg
fivetran-reneeli Nov 22, 2022
d2781b2
add columnss to existing models
fivetran-reneeli Nov 23, 2022
fcd4820
add fields to macros
fivetran-reneeli Nov 23, 2022
7e1a079
add fields to payment method card stf
fivetran-reneeli Nov 23, 2022
e4de987
add new table sources
fivetran-reneeli Nov 23, 2022
3bc3999
add new column desc to src yml
fivetran-reneeli Nov 23, 2022
2d5ea8d
additions to stg yml
fivetran-reneeli Nov 23, 2022
17ac4ad
update vars to global stripe vars
fivetran-reneeli Nov 23, 2022
3d220ca
add price plan source var
fivetran-reneeli Nov 23, 2022
b8abc2f
price plan toggle
fivetran-reneeli Nov 26, 2022
190eea2
change default to subscription history
fivetran-reneeli Nov 28, 2022
896a133
trying adding price and plan logic
fivetran-reneeli Nov 28, 2022
bbfd9b5
add status_transition child objects to invoice
fivetran-reneeli Nov 28, 2022
ab5b0b2
add three_d_secure obhects to payment method card
fivetran-reneeli Nov 28, 2022
38c47a7
add pause colleciton object to subscription
fivetran-reneeli Nov 28, 2022
1014a85
fix names in get paymenthod card columns
fivetran-reneeli Nov 28, 2022
ec10099
add new column defs to yml
fivetran-reneeli Nov 28, 2022
95791c4
comment out empty fields for now
fivetran-reneeli Nov 29, 2022
416464d
fix formatting and syntax errors
fivetran-reneeli Nov 29, 2022
d211870
fix pricing model jinja errors
fivetran-reneeli Nov 29, 2022
9887fbf
pricing model
fivetran-reneeli Nov 29, 2022
b8f4bb6
add union data feature
fivetran-reneeli Nov 29, 2022
ca86bb9
add union feature
fivetran-reneeli Nov 29, 2022
3ef2847
put union in select clause so livemode macro works
fivetran-reneeli Nov 29, 2022
86a126c
fix rest of formatting, add args in src relation
fivetran-reneeli Nov 30, 2022
c4c63ea
fix source relation column
fivetran-reneeli Nov 30, 2022
ae696af
try alias fix
fivetran-reneeli Nov 30, 2022
f7ccdc2
add seed price data
fivetran-reneeli Nov 30, 2022
5b94c2d
add alias to select stmt
fivetran-reneeli Nov 30, 2022
0f6bf74
whoops forgot alias
fivetran-reneeli Nov 30, 2022
ccb765b
update column names
fivetran-reneeli Nov 30, 2022
98218a7
fix timestamp
fivetran-reneeli Nov 30, 2022
ddb60be
update column in yml
fivetran-reneeli Nov 30, 2022
ff70bb0
add vars to run sh
fivetran-reneeli Nov 30, 2022
aa9001b
finish ymls
fivetran-reneeli Dec 1, 2022
2a3c26f
update conditional
fivetran-reneeli Dec 1, 2022
0021f35
Merge branch 'stripe_updates' of https://github.com/fivetran/dbt_stri…
fivetran-reneeli Dec 1, 2022
b37936f
formatting
fivetran-reneeli Dec 1, 2022
63605fc
cast timestamps
fivetran-reneeli Dec 1, 2022
918e684
documentation and timestamp fixes
fivetran-reneeli Dec 1, 2022
7aa6813
timestamp typo
fivetran-reneeli Dec 2, 2022
9ec451f
comma
fivetran-reneeli Dec 2, 2022
52b6143
add timestamp to missing columsn in seed
fivetran-reneeli Dec 2, 2022
8010105
cast seed as timestamp in int test yml
fivetran-reneeli Dec 2, 2022
736dfbf
timestamp formatting
fivetran-reneeli Dec 2, 2022
dd718c1
seed is created not created_at
fivetran-reneeli Dec 5, 2022
b1dc82c
add account model
fivetran-reneeli Dec 6, 2022
e8cca0b
add account
fivetran-reneeli Dec 6, 2022
684fa98
add more account updates
fivetran-reneeli Dec 7, 2022
9cd961c
fix
fivetran-reneeli Dec 7, 2022
6cf0870
fix
fivetran-reneeli Dec 7, 2022
f15c97e
fix seed data
fivetran-reneeli Dec 7, 2022
b7fe348
seed data fix attempt 2
fivetran-reneeli Dec 7, 2022
838288f
switch phone to string, fix pricing test
fivetran-reneeli Dec 7, 2022
923c1ab
seed fix and add yml docs for account
fivetran-reneeli Dec 7, 2022
3a63ea0
add null field for price plan to solve test error
fivetran-reneeli Dec 7, 2022
4bcfb9e
update yml
fivetran-reneeli Dec 8, 2022
1881220
try surr key for pricing
fivetran-reneeli Dec 8, 2022
5dad11c
fix surrogate
fivetran-reneeli Dec 8, 2022
5cb7571
fix field name in surr key
fivetran-reneeli Dec 9, 2022
0f26110
yml updates
fivetran-reneeli Dec 12, 2022
874b694
readme updates
fivetran-reneeli Dec 12, 2022
3fdca6f
update table identifier to identifier names
fivetran-reneeli Dec 13, 2022
68b1ea2
update stripe price var
fivetran-reneeli Dec 13, 2022
4bab099
revert identifier naming in union data
fivetran-reneeli Dec 14, 2022
c497daf
add does_table_exist macro to subscription model and updated variable…
fivetran-reneeli Dec 14, 2022
20b00a9
readme
fivetran-reneeli Dec 15, 2022
54c0987
address notes
fivetran-reneeli Jan 18, 2023
0b4c140
cleanup
fivetran-reneeli Jan 19, 2023
1227d8e
more cleanup
fivetran-reneeli Jan 19, 2023
16ab73a
updates
fivetran-reneeli Jan 19, 2023
162f4c9
Apply suggestions from code review
fivetran-reneeli Jan 19, 2023
b6b87ab
add account metadata
fivetran-reneeli Jan 23, 2023
7247c48
readme
fivetran-reneeli Jan 25, 2023
39bab56
updates
fivetran-reneeli Jan 25, 2023
a0eeedc
readme update
fivetran-reneeli Jan 25, 2023
de1bb19
updatees to existing stg
fivetran-reneeli Nov 22, 2022
99a73ac
docs
fivetran-reneeli Jan 25, 2023
21395ab
merge conflict
fivetran-reneeli Jan 25, 2023
42819cd
fix columns
fivetran-reneeli Jan 26, 2023
b88a9d8
docs
fivetran-reneeli Jan 26, 2023
7ebb1e8
price plan updates
fivetran-reneeli Jan 26, 2023
e601360
updates
fivetran-reneeli Jan 27, 2023
c98cc40
Update README.md
fivetran-reneeli Jan 27, 2023
60fe873
docs
fivetran-reneeli Jan 27, 2023
aaea686
updates
fivetran-reneeli Jan 27, 2023
b9e719e
docs
fivetran-reneeli Jan 27, 2023
f6b8abe
Update CHANGELOG.md
fivetran-reneeli Jan 30, 2023
eaa64ab
Update README.md
fivetran-reneeli Jan 30, 2023
d5e7d6d
Update README.md
fivetran-reneeli Jan 30, 2023
dd8858b
updates
fivetran-reneeli Jan 30, 2023
174f713
docs
fivetran-reneeli Jan 30, 2023
cf1620b
Merge branch 'main' into stripe_updates
fivetran-reneeli Jan 30, 2023
7a8f174
updates
fivetran-reneeli Jan 30, 2023
8c0dc60
Merge branch 'stripe_updates' of https://github.com/fivetran/dbt_stri…
fivetran-reneeli Jan 30, 2023
21b7880
updates
fivetran-reneeli Jan 30, 2023
d4cbd48
docs
fivetran-reneeli Jan 30, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/scripts/run_models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ dbt deps
dbt seed --target "$db" --full-refresh
dbt run --target "$db" --full-refresh
dbt test --target "$db"
dbt run --vars '{using_invoice_line_sub_filter: false, using_credit_notes: true}' --full-refresh --target "$db"
dbt run --vars '{stripe__using_invoice_line_sub_filter: false, stripe__using_credit_notes: true, stripe__using_price: false, stripe__using_subscription_history: false}' --full-refresh --target "$db"
dbt test --target "$db"
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
# dbt_stripe_source v0.9.0

[PR #59](https://github.com/fivetran/dbt_stripe_source/pull/59) contains the following changes:
## 🎉 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](https://github.com/fivetran/dbt_stripe_source#unioning-multiple-stripe-connectors) [#33](https://github.com/fivetran/dbt_stripe_source/issues/33)
- Added new `price` source table in addition to new `stripe__using_price` variable. Stripe migrated the Plan API to Price API (for more information, refer to their [docs](https://stripe.com/docs/billing/migration/migrating-prices)) so we recommend using the price table. The `stripe__using_price` variable and `does_table_exist` macro checks to see if you are indeed using the `price` table. If you plan on using the `plan` table instead you may toggle this to False. For more information on how to configure, refer to the [README](https://github.com/fivetran/dbt_stripe_source#leveraging-plan-vs-price-sources).
- Added additional fields to the following models: `stg_stripe__charge`, `stg_stripe__invoice` [#53](https://github.com/fivetran/dbt_stripe_source/issues/53), `stg_stripe__invoice_line_item`,`stg_stripe__payment_method_card`, `stg_stripe__refund`, `stg_stripe__subscription`.
fivetran-reneeli marked this conversation as resolved.
Show resolved Hide resolved

## 🚨 Breaking Changes 🚨:
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
- Variable names have been updated to contain the `stripe` prefix, allowing you to configure global variables while only affecting the Stripe package.
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

| **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 to `stg_stripe__price_plan`. Following Stripe's migration from the `Plan` object to the `Price` object ([Stripe doc here.](https://stripe.com/docs/billing/migration/migrating-prices)), we have added a new variable `stripe__using_price` and macro `does_table_exist` that checks if the `price` table exists. This package uses `price` by default if exists. However, if you still have and wish to keep using `plan` which we recommend, you can set `stripe__using_price` to False. For more please see the [README](https://github.com/fivetran/dbt_stripe_source#leveraging-plan-vs-price-sources)
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
- Stripe connectors set up after February 09, 2022 will use the `subscription_history` table, as they will no longer be syncing the `subscription` table. This package uses `subscription_history` by default if exists. However, if you still have the `subscription` table and wish to use it instead, then set the `stripe__using_subscription_history` to False. For more please see the [README](https://github.com/fivetran/dbt_stripe_source/#leveraging-subscription-vs-subscription-history-sources)
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

# dbt_stripe_source v0.8.0

## 🚨 Breaking Changes 🚨:
Expand Down
84 changes: 62 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Include the following stripe_source package version in your `packages.yml` file.
```yaml
packages:
- package: fivetran/stripe_source
version: [">=0.8.0", "<0.9.0"]
version: [">=0.9.0", "<0.10.0"]
```
## Step 3: Define database and schema variables
By default, this package runs using your destination and the `stripe` schema. If this is not where your stripe data is (for example, if your stripe schema is named `stripe_fivetran`), add the following configuration to your root `dbt_project.yml` file:
Expand All @@ -50,56 +50,95 @@ vars:
stripe_schema: your_schema_name
```
## Step 4: Disable models for non-existent sources
This package takes into consideration that not every Stripe account utilizes the `invoice`, `invoice_line_item`, `payment_method`, `payment_method_card`, `plan`, `subscription`, or `credit_note` features, and allows you to disable the corresponding functionality. By default, all variables' values are assumed to be `true` with the exception of `credit_note`. Add variables for only the tables you want to disable or enable respectively:
This package takes into consideration that not every Stripe account utilizes the `invoice`, `invoice_line_item`, `payment_method`, `payment_method_card`, `plan`, `price`, `subscription`, or `credit_note` features, and allows you to disable the corresponding functionality. By default, all variables' values are assumed to be `true` with the exception of `credit_note`. Add variables for only the tables you want to disable or enable respectively:

```yml
# dbt_project.yml

...
vars:
using_invoices: False #Disable if you are not using the invoice and invoice_line_item tables
using_payment_method: False #Disable if you are not using the payment_method and payment_method_card tables
using_subscriptions: False #Disable if you are not using the subscription and plan tables.
using_credit_notes: True #Enable if you are using the credit note tables.
stripe__using_invoices: False #Disable if you are not using the invoice and invoice_line_item tables
stripe__using_payment_method: False #Disable if you are not using the payment_method and payment_method_card tables
stripe__using_subscriptions: False #Disable if you are not using the subscription and plan/price tables.
stripe__using_credit_notes: True #Enable if you are using the credit note tables.

```
## Step 5: Leveraging Subscription Vs Subscription History Sources
For Stripe connectors set up after February 09, 2022 the `subscription` table has been replaced with the new `subscription_history` table. By default this package will look for your subscription data within the `subscription` source table. However, if you have a newer connector then you must leverage the `stripe__subscription_history` to have the package use the `subscription_history` source rather than the `subscription` table.
> **Please note that if you have `stripe__subscription_history` enabled then the package will filter for only active records.**
## (Optional) Step 5: Additional configurations
<details><summary>Expand to view configurations</summary>

### Leveraging Plan vs Price Sources

Customers using Fivetran with the newer Stripe Price API will have a `price` table in place of the older `plan` table. Therefore to accommodate two different source tables we added additional logic in the `stg_stripe__price_plan` model, which replaces the `stg_stripe__plan` model. This model checks if there exists a `price` table using a new `does_table_exist()` macro. If not, it will look for a `plan` table. The default is to use the `price` table if it exists. However if you wish to use the `plan` table instead, you may set `stripe__using_price` to `false` in your `dbt_project.yml` to override the macro.
fivetran-reneeli marked this conversation as resolved.
Show resolved Hide resolved

We recommend using the `price` table as Stripe replaced the Plans API with the Price API and is backwards compatible.
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

```yml
# dbt_project.yml

...
config-version: 2

vars:
stripe:
stripe__using_price: false # True by default. If true, will look `price ` table. If false, will look for the `plan` table.
fivetran-reneeli marked this conversation as resolved.
Show resolved Hide resolved
```

### Leveraging Subscription Vs Subscription History Sources
For Stripe connectors set up after February 09, 2022 the `subscription` table has been replaced with the new `subscription_history` table. By default this package will look for your subscription data within the `subscription_history` source table. However, if you have an older connector then you must configure the `stripe__using_subscription_history` to `false` in order to have the package use the `subscription` source rather than the `subscription_history` table.
> **Please note that if you have `stripe__using_subscription_history` enabled then the package will filter for only active records.**
```yml
vars:
stripe__subscription_history: True # False by default. Set to True if your connector syncs the `subscription_history` table.
stripe__using_subscription_history: False # True by default. Set to False if your connector syncs the `subscription` table instead.
```

### Unioning Multiple Stripe Connectors
If you have multiple Stripe connectors you would like to use this package on simultaneously, we have added the ability to do so. Data from disparate connectors will be unioned together and be passed downstream to the end models. The `source_relation` column will specify where each record comes from. To use this functionality, you will need to either set the `stripe_union_schemas` or `stripe_union_databases` variables. Please also make sure the single-source `stripe_database` and `stripe_schema` variables are removed.

```yml
# dbt_project.yml

...
config-version: 2

vars:
stripe_union_schemas: ['stripe_us','stripe_mx'] # use this if the data is in different schemas/datasets of the same database/project
stripe_union_databases: ['stripe_db_1','stripe_db_2'] # use this if the data is in different databases/projects but uses the same schema name
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
```
## (Optional) Step 6: Additional configurations
<details><summary>Expand to view configurations</summary>

### Running on Live vs Test Customers
By default, this package will run on non-test data (`where livemode = true`) from the source Stripe tables. However, you may want to include and focus on test data when testing out the package or developing your analyses. To run on only test data, add the following configuration to your root `dbt_project.yml` file:

```yml
vars:
stripe_source:
using_livemode: false # Default = true
stripe__using_livemode: false # Default = true
```
### Including sub Invoice Line Items
By default, this package will filter out any records from the `invoice_line_item` source table which include the string `sub_`. This is due to a legacy Stripe issue where `sub_` records were found to be duplicated. However, if you highly utilize these records you may wish they be included in the final output of the `stg_stripe__invoice_line_item` model. To do, so you may include the below variable configuration in your root `dbt_project.yml`:
```yml
vars:
stripe_source:
using_invoice_line_sub_filter: false # Default = true
stripe__using_invoice_line_sub_filter: false # Default = true
```

### Pivoting out Metadata Properties
Oftentimes you may have custom fields within your source tables that is stored as a JSON object that you wish to pass through. By leveraging the `metadata` variable, this package pivot out fields into their own columns. The metadata variables accept dictionaries in addition to strings.

Additionally, if you happen to be using a reserved word as a metadata field, any otherwise incompatible name, or just wish to rename your field, Below are examples of how you would add the respective fields.
Additionally, you may `alias` your field if you happen to be using a reserved word as a metadata field, any otherwise incompatible name, or just wish to rename your field. Below are examples of how you would add the respective fields.

The `metadata` JSON field is present within the `customer`, `charge`, `invoice`, `payment_intent`, `payment_method`, `payout`, `plan`, `refund`, and `subscription` source tables. To pivot these fields out and include in the respective downstream staging model, add the respective variable(s) to your root `dbt_project.yml` file like below.
The `metadata` JSON field is present within the `customer`, `charge`, `invoice`, `payment_intent`, `payment_method`, `payout`, `plan`, `price`, `refund`, and `subscription` source tables. To pivot these fields out and include in the respective downstream staging model, add the respective variable(s) to your root `dbt_project.yml` file like below.

```yml
vars:
stripe__account_metadata:
- name: metadata_field
- name: another_metadata_field
- name: and_another_metadata_field
stripe__charge_metadata:
- name: metadata_field_1
stripe__customer_metadata:
- name: metadata_field_6
alias: metadata_field_six
stripe__invoice_metadata:
- name: metadata_field_2
stripe__payment_intent_metadata:
Expand All @@ -113,14 +152,15 @@ vars:
alias: one_two_three
stripe__plan_metadata:
- name: rename
- alias: renamed_field
alias: renamed_field
stripe__price_metadata:
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
- name: rename_price
alias: renamed_field_price
stripe__refund_metadata:
- name: metadata_field_3
- name: metadata_field_4
stripe__subscription_metadata:
- name: metadata_field_5
stripe__customer_metadata:
- name: metadata_field_6
- name: 567
alias: five_six_seven

```

Expand Down Expand Up @@ -151,7 +191,7 @@ vars:

</details>

## (Optional) Step 7: Orchestrate your models with Fivetran Transformations for dbt Core™
## (Optional) Step 6: Orchestrate your models with Fivetran Transformations for dbt Core™
<details><summary>Expand to view details</summary>
<br>

Expand Down
17 changes: 6 additions & 11 deletions dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'stripe_source'
version: '0.8.0'
version: '0.9.0'
require-dbt-version: [">=1.3.0", "<2.0.0"]

models:
Expand All @@ -11,9 +11,12 @@ models:
materialized: view
vars:
stripe_source:
account: "{{ source('stripe', 'account') }}"
balance_transaction: "{{ source('stripe', 'balance_transaction') }}"
card: "{{ source('stripe', 'card') }}"
charge: "{{ source('stripe', 'charge') }}"
credit_note: "{{ source('stripe', 'credit_note') }}"
credit_note_line_item: "{{ source('stripe', 'credit_note_line_item') }}"
customer: "{{ source('stripe', 'customer') }}"
fee: "{{ source('stripe', 'fee') }}"
invoice: "{{ source('stripe', 'invoice') }}"
Expand All @@ -23,15 +26,7 @@ vars:
payment_method: "{{ source('stripe', 'payment_method') }}"
payout: "{{ source('stripe', 'payout') }}"
plan: "{{ source('stripe', 'plan') }}"
price: "{{ source('stripe', 'price') }}"
refund: "{{ source('stripe', 'refund') }}"
subscription_history: "{{ source('stripe', 'subscription_history') }}"
subscription: "{{ source('stripe', 'subscription') }}"
credit_note: "{{ source('stripe', 'credit_note') }}"
credit_note_line_item: "{{ source('stripe', 'credit_note_line_item') }}"
using_invoices: true
using_credit_notes: false
using_payment_method: true
using_subscriptions: true
stripe__subscription_history: false
using_livemode: true
using_invoice_line_sub_filter: true
subscription: "{{ source('stripe', 'subscription') }}"
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

14 changes: 13 additions & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
config-version: 2

name: 'stripe_source_integration_tests'
version: '0.8.0'
version: '0.9.0'


profile: 'integration_tests'

vars:
stripe_schema: stripe_source_integrations_tests
stripe_source:
stripe_account_identifier: "account_data"
stripe_group_identifier: "group_data"
stripe_balance_transaction_identifier: "balance_transaction_data"
stripe_card_identifier: "card_data"
Expand All @@ -22,6 +23,7 @@ vars:
stripe_payment_method_identifier: "payment_method_data"
stripe_payout_identifier: "payout_data"
stripe_plan_identifier: "plan_data"
stripe_price_identifier: "price_data"
stripe_refund_identifier: "refund_data"
stripe_subscription_history_identifier: "subscription_history_data"
stripe_subscription_identifier: "subscription_data"
Expand All @@ -33,6 +35,16 @@ seeds:
stripe_source_integration_tests:
+column_types:
_fivetran_synced: timestamp
created: timestamp
voided_at: timestamp
account_data:
+column_types:
id: "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"
company_address_postal_code: "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"
individual_id: "{%- if target.type == 'bigquery' -%} INT64 {%- else -%} bigint {%- endif -%}"
invoice_data:
+column_types:
id: "{{ 'varchar(100)' if target.name in ('redshift', 'postgres') else 'string' }}"

dispatch:
- macro_namespace: dbt_utils
Expand Down
Loading