Skip to content

Commit

Permalink
Fixing an issue where the mutually exclusive range test doesn't work … (
Browse files Browse the repository at this point in the history
#430)

* 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: #423

* Bumping dbt version to take into account CircleCI already being upgrade to dbt 1.0b as per Joel Labes

* Further tweak to version number checks to try to fix CircleCI

* Update pull_request_template.md (#438)

* Update pull_request_template.md

* Update .github/pull_request_template.md

* Add 0.8.0 changelog block

* Add changelog for mutually excl ranges change
  • Loading branch information
codigo-ergo-sum authored Nov 9, 2021
1 parent cd4c5e2 commit d8cf447
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 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

Expand Down
2 changes: 1 addition & 1 deletion macros/schema_tests/mutually_exclusive_ranges.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d8cf447

Please sign in to comment.