From fb2483def7e3272b38e9a87d0c26a5ff06ce6df0 Mon Sep 17 00:00:00 2001 From: Josh Andrews Date: Wed, 20 Oct 2021 15:38:58 -0700 Subject: [PATCH 1/6] Fixing an issue where the mutually exclusive range test doesn't work with store failures with a multi-column concatenated partition by clause. As per: https://github.com/dbt-labs/dbt-utils/issues/423 --- macros/schema_tests/mutually_exclusive_ranges.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/macros/schema_tests/mutually_exclusive_ranges.sql b/macros/schema_tests/mutually_exclusive_ranges.sql index f2da3b95..f88efbe4 100644 --- a/macros/schema_tests/mutually_exclusive_ranges.sql +++ b/macros/schema_tests/mutually_exclusive_ranges.sql @@ -35,7 +35,7 @@ with window_functions as ( select {% if partition_by %} - {{ partition_by }}, + {{ partition_by }} as partition_by_col, {% endif %} {{ lower_bound_column }} as lower_bound, {{ upper_bound_column }} as upper_bound, From fcd1737a7898419533b9c5a6b048c37ee93054fc Mon Sep 17 00:00:00 2001 From: Josh Andrews Date: Wed, 20 Oct 2021 15:55:21 -0700 Subject: [PATCH 2/6] Bumping dbt version to take into account CircleCI already being upgrade to dbt 1.0b as per Joel Labes --- dbt_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_project.yml b/dbt_project.yml index 3bc011c5..1a9b1612 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,7 +1,7 @@ name: 'dbt_utils' version: '0.7.0' -require-dbt-version: [">=0.20.0", "<0.22.0"] +require-dbt-version: [">=0.20.0", "<=1.0"] config-version: 2 From e0b637836acf97d0f4248de376425c787b56ce24 Mon Sep 17 00:00:00 2001 From: Josh Andrews Date: Wed, 20 Oct 2021 20:13:07 -0700 Subject: [PATCH 3/6] Further tweak to version number checks to try to fix CircleCI --- dbt_project.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbt_project.yml b/dbt_project.yml index 1a9b1612..aaaf9d49 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,7 +1,7 @@ name: 'dbt_utils' version: '0.7.0' -require-dbt-version: [">=0.20.0", "<=1.0"] +require-dbt-version: [">=0.20.0", "<=1.0.0"] config-version: 2 From 4a0a81a25a82d2f3be6c3be19637ab58f400f264 Mon Sep 17 00:00:00 2001 From: Anders Date: Mon, 8 Nov 2021 20:33:55 -0800 Subject: [PATCH 4/6] Update pull_request_template.md (#438) * Update pull_request_template.md * Update .github/pull_request_template.md --- .github/pull_request_template.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 32ec56ed..7d8278dd 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -14,7 +14,10 @@ Describe your changes, and why you're making them. - [ ] Postgres - [ ] Redshift - [ ] Snowflake -- [ ] I have "dispatched" any new macro(s) so non-core adapters can also use them (e.g. [the `star()` source](https://github.com/fishtown-analytics/dbt-utils/blob/master/macros/sql/star.sql)) +- [ ] I followed guidelines to ensure that my changes will work on "non-core" adapters by: + - [ ] dispatching any new macro(s) so non-core adapters can also use them (e.g. [the `star()` source](https://github.com/fishtown-analytics/dbt-utils/blob/master/macros/sql/star.sql)) + - [ ] using the `limit_zero()` macro in place of the literal string: `limit 0` + - [ ] using `dbt_utils.type_*` macros instead of explicit datatypes (e.g. `dbt_utils.type_timestamp()` instead of `TIMESTAMP` - [ ] I have updated the README.md (if applicable) - [ ] I have added tests & descriptions to my models (and macros if applicable) - [ ] I have added an entry to CHANGELOG.md From 216f4df8874755fc5ea2626819a9f8c19499950d Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Tue, 9 Nov 2021 17:38:57 +1300 Subject: [PATCH 5/6] Add 0.8.0 changelog block --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 150b71a2..e6dc7c15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +# dbt-utils v0.8.0 + # dbt-utils v0.7.4b1 This is a compatibility release in preparation for `dbt-core` v1.0.0 (🎉). When dbt-core 1.0.0 hits release candidate status, we will release the final version of 0.7.4 From ae263d29d520a4635a5cf041734a182df1982a2e Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Tue, 9 Nov 2021 17:51:28 +1300 Subject: [PATCH 6/6] Add changelog for mutually excl ranges change --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e6dc7c15..85d34510 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # dbt-utils v0.8.0 +## 🚨 Breaking changes +- The partition column in the `mutually_exclusive_ranges` test is now always called `partition_by_col`. This enables compatibility with `--store-failures` when multiple columns are concatenated together. If you have models built on top of the failures table, update them to reflect the new column name. ([#423](https://github.com/dbt-labs/dbt-utils/issues/423), [#430](https://github.com/dbt-labs/dbt-utils/pull/430)) + +## Contributors: +- [codigo-ergo-sum](https://github.com/codigo-ergo-sum) (#430) # dbt-utils v0.7.4b1 This is a compatibility release in preparation for `dbt-core` v1.0.0 (🎉). When dbt-core 1.0.0 hits release candidate status, we will release the final version of 0.7.4