From 8b74cd358eb045ecd5ce4601522bdc5e656e6bd7 Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Mon, 6 Dec 2021 16:59:49 -0600 Subject: [PATCH 1/3] timestamp and changelog updates --- .github/pull_request_template.md | 2 +- CHANGELOG.md | 3 +++ macros/cross_db_utils/datatypes.sql | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7d8278dd..3a381a66 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,5 +1,5 @@ This is a: -- [ ] bug fix PR with no breaking changes — please ensure the base branch is `master` +- [ ] bug fix PR with no breaking changes — please ensure the base branch is `main` - [ ] new functionality — please ensure the base branch is the latest `dev/` branch - [ ] a breaking change — please ensure the base branch is the latest `dev/` branch diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ad5e3e0..f607e721 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# dbt-utils (next version) +## Fixes +- `type_timestamp` macro now explicitly casts postgres and redshift warehouse timestamp data types as `timestamp without timezone`. # dbt-utils v0.8.0 ## 🚨 Breaking changes - dbt ONE POINT OH is here! This version of dbt-utils requires _any_ version (minor and patch) of v1, which means far less need for compatibility releases in the future. diff --git a/macros/cross_db_utils/datatypes.sql b/macros/cross_db_utils/datatypes.sql index 3dc532b8..f115b4e2 100644 --- a/macros/cross_db_utils/datatypes.sql +++ b/macros/cross_db_utils/datatypes.sql @@ -32,6 +32,10 @@ timestamp {% endmacro %} +{% macro postgres__type_timestamp() %} + timestamp without time zone +{% endmacro %} + {% macro snowflake__type_timestamp() %} timestamp_ntz {% endmacro %} From 8bbd69853cfd151eecc3ee8b06001e700b9827d9 Mon Sep 17 00:00:00 2001 From: fivetran-joemarkiewicz Date: Mon, 6 Dec 2021 17:10:24 -0600 Subject: [PATCH 2/3] changelog fix --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f607e721..6351a33b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # dbt-utils (next version) ## Fixes -- `type_timestamp` macro now explicitly casts postgres and redshift warehouse timestamp data types as `timestamp without timezone`. +- `type_timestamp` macro now explicitly casts postgres and redshift warehouse timestamp data types as `timestamp without time zone`. # dbt-utils v0.8.0 ## 🚨 Breaking changes - dbt ONE POINT OH is here! This version of dbt-utils requires _any_ version (minor and patch) of v1, which means far less need for compatibility releases in the future. From d872245473c0e3cda52655dcdcb10e4e7a3a8e29 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Tue, 14 Dec 2021 15:12:41 +1300 Subject: [PATCH 3/3] Add context for why change to no timezone --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6351a33b..b64c27c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # dbt-utils (next version) ## Fixes -- `type_timestamp` macro now explicitly casts postgres and redshift warehouse timestamp data types as `timestamp without time zone`. +- `type_timestamp` macro now explicitly casts postgres and redshift warehouse timestamp data types as `timestamp without time zone`, to be consistent with Snowflake behaviour (`timestamp_ntz`). # dbt-utils v0.8.0 ## 🚨 Breaking changes - dbt ONE POINT OH is here! This version of dbt-utils requires _any_ version (minor and patch) of v1, which means far less need for compatibility releases in the future.