Skip to content

Commit 48567a6

Browse files
author
Claire Carroll
authored
Merge pull request #272 from fishtown-analytics/prepare-0.6.0-release
Prepare 0.6.0 release
2 parents 7d26745 + dca0220 commit 48567a6

File tree

3 files changed

+23
-17
lines changed

3 files changed

+23
-17
lines changed

CHANGELOG.md

+9-15
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# dbt-utils v0.6.0 (unreleased)
1+
# dbt-utils v0.6.0
22

33
## Breaking changes
44
- :rotating_light: dbt v0.18.0 or greater is required for this release. If you are not ready to upgrade, consider using a previous release of this package
55
- :rotating_light: The `get_tables_by_prefix`, `union_tables` and `get_tables_by_pattern` macros have been removed
66

77
## Migration instructions
88
- Upgrade your dbt project to v0.18.0 using [these instructions](https://discourse.getdbt.com/t/prerelease-v0-18-0-marian-anderson/1545).
9-
- Upgrade your `dbt_project.yml` file to use version `0.7.0`. Run `dbt clean` and `dbt deps`.
9+
- Upgrade your `packages.yml` file to use version `0.6.0` of this package. Run `dbt clean` and `dbt deps`.
1010
- If your project uses the `get_tables_by_prefix` macro, replace it with `get_relations_by_prefix`. All arguments have retained the same name.
1111
- If your project uses the `union_tables` macro, replace it with `union_relations`. While the order of arguments has stayed consistent, the `tables` argument has been renamed to `relations`. Further, the default value for the `source_column_name` argument has changed from `'_dbt_source_table'` to `'_dbt_source_relation'` — you may want to explicitly define this argument to avoid breaking changes.
1212

@@ -26,27 +26,21 @@
2626
```
2727
- If your project uses the `get_tables_by_pattern` macro, replace it with `get_tables_by_pattern_sql` — all arguments are consistent.
2828

29-
## Fixes
30-
3129
## Features
3230

3331
* Switch usage of `adapter_macro` to `adapter.dispatch`, and define `dbt_utils_dispatch_list`,
3432
enabling users of community-supported database plugins to add or override macro implementations
35-
specific to their database (#267)
33+
specific to their database ([#267](https://github.com/fishtown-analytics/dbt-utils/pull/267))
3634
* Use `add_ephemeral_prefix` instead of hard-coding a string literal, to support
37-
database adapters that use different prefixes (#267)
35+
database adapters that use different prefixes ([#267](https://github.com/fishtown-analytics/dbt-utils/pull/267))
36+
* Implement a quote_columns argument in the unique_combination_of_columns schema test ([#270](https://github.com/fishtown-analytics/dbt-utils/pull/270) [@JoshuaHuntley](https://github.com/JoshuaHuntley))
3837

3938
## Quality of life
40-
* Remove deprecated macros `get_tables_by_prefix` and `union_tables` (#268)
41-
* Remove `get_tables_by_pattern` macro, which is equivalent to the `get_tables_by_pattern_sql` macro (the latter has a more logical name)
39+
* Remove deprecated macros `get_tables_by_prefix` and `union_tables` ([#268](https://github.com/fishtown-analytics/dbt-utils/pull/268))
40+
* Remove `get_tables_by_pattern` macro, which is equivalent to the `get_tables_by_pattern_sql` macro (the latter has a more logical name) ([#268](https://github.com/fishtown-analytics/dbt-utils/pull/268))
4241

4342
# dbt-utils v0.5.1
4443

45-
## Fixes
46-
47-
## Features
48-
4944
## Quality of life
50-
* Improve release process, and fix tests (#251)
51-
* Make deprecation warnings more useful (#258 @tayloramurphy)
52-
* Upgrade unique_combination_of_columns.sql macro to respect the quote_columns=TRUE flag as a test argument
45+
* Improve release process, and fix tests ([#251](https://github.com/fishtown-analytics/dbt-utils/pull/251))
46+
* Make deprecation warnings more useful ([#258](https://github.com/fishtown-analytics/dbt-utils/pull/258) [@tayloramurphy](https://github.com/tayloramurphy))

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,18 @@ case we recommend using this test instead.
406406
- product
407407
```
408408

409+
An optional `quote_columns` parameter (`default=false`) can also be used if a column name needs to be quoted.
410+
411+
```yaml
412+
- name: revenue_by_product_by_month
413+
tests:
414+
- dbt_utils.unique_combination_of_columns:
415+
combination_of_columns:
416+
- month
417+
- group
418+
quote_columns: true
419+
```
420+
409421
---
410422
### SQL helpers
411423
#### get_query_results_as_dict ([source](macros/sql/get_query_results_as_dict.sql))
@@ -782,7 +794,7 @@ dbt v0.18.0 introduces `adapter.dispatch()`, a reliable way to define different
782794
across different databases.
783795

784796
All dispatched macros in `dbt_utils` have an override setting: a `var` named
785-
`dbt_utils_dispatch_list` that accepts a list of package names. If you set this
797+
`dbt_utils_dispatch_list` that accepts a list of package names. If you set this
786798
variable in your project, when dbt searches for implementations of a dispatched
787799
`dbt_utils` macro, it will search through your listed packages _before_ using
788800
the implementations defined in `dbt_utils`.

run_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if [[ ! -f $VENV ]]; then
66
. $VENV
77

88
pip install --upgrade pip setuptools
9-
pip install "dbt==0.18.0rc1"
9+
pip install "dbt>=0.18.0,<0.19.0"
1010
fi
1111

1212
. $VENV

0 commit comments

Comments
 (0)