Skip to content

Commit

Permalink
Merge pull request #34 from fivetran/bugfix/timestamp-tz-fix
Browse files Browse the repository at this point in the history
Bugfix/timestamp tz fix: don't merge until next dbt_utils release
  • Loading branch information
fivetran-jamie authored Feb 25, 2022
2 parents b567640 + 6da2af8 commit 5e28c2d
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
target/
dbt_modules/
logs/

dbt_packages/
dbt_packages/
.DS_Store
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# dbt_stripe_source v0.5.1

## Under the Hood
- Addresses a bug in which timestamp columns in the `balance_transaction` source table are brought in as `timestamp with time zone` on Redshift and Postgres, which caused downstream datatype errors. These columns are now always cast as `timestamp without time zone` in the staging `balance_transaction` model ([#22](https://github.com/fivetran/dbt_stripe/issues/22)).

# dbt_stripe_source v0.5.0

🎉 dbt v1.0.0 Compatibility 🎉
## 🚨 Breaking Changes 🚨
- Adjusts the `require-dbt-version` to now be within the range [">=1.0.0", "<2.0.0"]. Additionally, the package has been updated for dbt v1.0.0 compatibility. If you are using a dbt version <1.0.0, you will need to upgrade in order to leverage the latest version of the package.
Expand All @@ -7,7 +13,6 @@
- Upgrades the package dependency to refer to the latest `dbt_fivetran_utils`. The latest `dbt_fivetran_utils` package also has a dependency on `dbt_utils` [">=0.8.0", "<0.9.0"].
- Please note, if you are installing a version of `dbt_utils` in your `packages.yml` that is not in the range above then you will encounter a package dependency error.


# dbt_stripe_source v0.4.4

## Features
Expand Down
2 changes: 1 addition & 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.5.0'
version: '0.5.1'
require-dbt-version: [">=1.0.0", "<2.0.0"]

models:
Expand Down
3 changes: 2 additions & 1 deletion integration_tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
target/
dbt_modules/
logs/
.DS_Store
.DS_Store
dbt_packages/
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.4.4'
version: '0.5.1'

profile: 'integration_tests'

Expand Down
7 changes: 5 additions & 2 deletions models/stg_stripe__balance_transaction.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@ final as (
select
id as balance_transaction_id,
amount,
available_on,
created as created_at,

-- ensure that these are timestamps without timezones on postgres + redshift
cast(available_on as {{ dbt_utils.type_timestamp() }}) as available_on,
cast(created as {{ dbt_utils.type_timestamp() }}) as created_at,

currency,
description,
exchange_rate,
Expand Down

0 comments on commit 5e28c2d

Please sign in to comment.