Skip to content

Commit

Permalink
Merge pull request #45 from fivetran/timezone_description
Browse files Browse the repository at this point in the history
Add timezone notation to timestamp column definition (#42)
Addition of subscription ID in the stg_stripe__invoice model (#41)
  • Loading branch information
fivetran-reneeli authored Jun 21, 2022
2 parents 7ca6119 + 3e45be0 commit 3c0a8f1
Show file tree
Hide file tree
Showing 10 changed files with 28 additions and 12 deletions.
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# dbt_stripe_source v0.7.1
## 🎉 Documentation and Feature Updates
- Add timezone notation to timestamp column definition ([#42](https://github.com/fivetran/dbt_stripe_source/pull/42))
- Addition of subscription ID in the `stg_stripe__invoice` model ([#41](https://github.com/fivetran/dbt_stripe_source/pull/41))

## Contributors
- [mvtemple](https://github.com/mvtemple) ([#43](https://github.com/fivetran/dbt_stripe_source/issues/43))
- [ashishk-de](https://github.com/ashishk-de) ([#44](https://github.com/fivetran/dbt_stripe_source/issues/44))

# dbt_stripe_source v0.7.0
## 🎉 Documentation and Feature Updates
- Updated README documentation updates for easier navigation and setup of the dbt package
Expand All @@ -9,7 +18,7 @@

## Features
- Added Postgres support for the Stripe package ([#39](https://github.com/fivetran/dbt_stripe_source/pull/39))
-

## Contributors
- [nachimehta](https://github.com/nachimehta) ([#37](https://github.com/fivetran/dbt_stripe_source/pull/37))

Expand Down
3 changes: 2 additions & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2

name: 'stripe_source'
version: '0.7.0'
version: '0.7.1'

require-dbt-version: [">=1.0.0", "<2.0.0"]

Expand Down Expand Up @@ -31,6 +31,7 @@ vars:
subscription: "{{ source('stripe', 'subscription') }}"
credit_note: "{{ source('stripe', 'credit_note') }}"
credit_note_line_item: "{{ source('stripe', 'credit_note_line_item') }}"


#Variables to enable or disable models if you do not have the respective table.
using_invoices: true
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/index.html

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 integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2

name: 'stripe_source_integration_tests'
version: '0.7.0'
version: '0.7.1'


profile: 'integration_tests'
Expand Down
1 change: 1 addition & 0 deletions macros/get_invoice_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
{"name": "status_transitions_marked_uncollectible_at", "datatype": dbt_utils.type_timestamp()},
{"name": "status_transitions_paid_at", "datatype": dbt_utils.type_timestamp()},
{"name": "status_transitions_voided_at", "datatype": dbt_utils.type_timestamp()},
{"name": "subscription_id", "datatype": dbt_utils.type_string()},
{"name": "subscription_proration_date", "datatype": dbt_utils.type_int()},
{"name": "subtotal", "datatype": dbt_utils.type_int()},
{"name": "tax", "datatype": dbt_utils.type_int()},
Expand Down
4 changes: 3 additions & 1 deletion models/src_stripe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sources:
- name: available_on
description: The date the transaction’s net funds will become available in the Stripe balance.
- name: created
description: Timestamp of when the transaction was created.
description: Timestamp of when the transaction was created, in UTC.
- name: currency
description: Three-letter ISO currency code, in lowercase.
- name: description
Expand Down Expand Up @@ -381,6 +381,8 @@ sources:
description: This is the transaction number that appears on email receipts sent for this invoice.
- name: status
description: Status of the invoice.
- name: subscription_id
description: The ID of the subscription that the invoice item pertains to, if any.
- name: subtotal
description: Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied.
- name: tax
Expand Down
4 changes: 3 additions & 1 deletion models/stg_stripe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ models:
- name: available_on
description: The date the transaction’s net funds will become available in the Stripe balance.
- name: created_at
description: Timestamp of when the transaction was created.
description: Timestamp of when the transaction was created, in UTC.
- name: currency
description: Three-letter ISO currency code, in lowercase.
- name: description
Expand Down Expand Up @@ -369,6 +369,8 @@ models:
description: This is the transaction number that appears on email receipts sent for this invoice.
- name: status
description: Status of the invoice.
- name: subscription_id
description: The ID of the subscription that the invoice item pertains to, if any.
- name: subtotal
description: Total of all subscriptions, invoice items, and prorations on the invoice before any discount or tax is applied.
- name: tax
Expand Down
5 changes: 3 additions & 2 deletions models/stg_stripe__invoice.sql
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ final as (
subtotal,
tax,
tax_percent,
total

total,
subscription_id

{% if var('stripe__invoice_metadata',[]) %}
, {{ fivetran_utils.pivot_json_extract(string = 'metadata', list_of_properties = var('stripe__invoice_metadata')) }}
{% endif %}
Expand Down

0 comments on commit 3c0a8f1

Please sign in to comment.