|
11 | 11 | # Unreleased
|
12 | 12 |
|
13 | 13 | ## New features
|
| 14 | +- Updated the `slugify` macro to prepend "_" to column names beginning with a number since most databases do not allow names to begin with numbers. |
14 | 15 | - Implemented an optional `group_by_columns` argument across many of the generic testing macros to test for properties that only pertain to group-level or are can be more rigorously conducted at the group level. Property available in `recency`, `at_least_one`, `equal_row_count`, `fewer_rows_than`, `not_constant`, `not_null_proportion`, and `sequential` tests [#633](https://github.com/dbt-labs/dbt-utils/pull/633)
|
15 | 16 | - New feature to omit the `source_column_name` column on the `union_relations` macro ([#331](https://github.com/dbt-labs/dbt-utils/issues/331), [#624](https://github.com/dbt-labs/dbt-utils/pull/624))
|
| 17 | +- New macro `get_single_value` ([#696](https://github.com/dbt-labs/dbt-utils/pull/696)) |
16 | 18 | - New feature to select fewer columns in `expression_is_true` ([#683](https://github.com/dbt-labs/dbt-utils/issues/683), [#686](https://github.com/dbt-labs/dbt-utils/pull/686))
|
17 | 19 | - Add `not_empty_string` generic test that asserts column values are not an empty string. ([#632](https://github.com/dbt-labs/dbt-utils/issues/632), [#634](https://github.com/dbt-labs/dbt-utils/pull/634))
|
18 | 20 |
|
19 | 21 | ## Under the hood
|
20 |
| -- Remove deprecated table argument from unpivot ([#671](https://github.com/dbt-labs/dbt-utils/pull/671)) |
| 22 | +- Remove deprecated table argument from `unpivot` ([#671](https://github.com/dbt-labs/dbt-utils/pull/671)) |
21 | 23 | - Delete the deprecated identifier macro ([#672](https://github.com/dbt-labs/dbt-utils/pull/672))
|
22 | 24 | - Handle deprecations in deduplicate macro ([#673](https://github.com/dbt-labs/dbt-utils/pull/673))
|
23 |
| -- Fully remove varargs usage in surrogate_key and safe_add ([#674](https://github.com/dbt-labs/dbt-utils/pull/674)) |
| 25 | +- Fully remove varargs usage in `surrogate_key` and `safe_add` ([#674](https://github.com/dbt-labs/dbt-utils/pull/674)) |
| 26 | +- Remove obsolete condition argument from `expression_is_true` ([#699](https://github.com/dbt-labs/dbt-utils/pull/699)) |
| 27 | + |
| 28 | +## Migration instructions |
| 29 | +- If your project uses the `expression_is_true` macro, replace `condition` argument with `where`. |
| 30 | + |
| 31 | +Before: |
| 32 | +```yaml |
| 33 | +version: 2 |
| 34 | + |
| 35 | +models: |
| 36 | + - name: model_name |
| 37 | + tests: |
| 38 | + - dbt_utils.expression_is_true: |
| 39 | + expression: "col_a + col_b = total" |
| 40 | + condition: "created_at > '2018-12-31'" |
| 41 | +``` |
| 42 | +After: |
| 43 | +```yaml |
| 44 | +version: 2 |
| 45 | + |
| 46 | +models: |
| 47 | + - name: model_name |
| 48 | + tests: |
| 49 | + - dbt_utils.expression_is_true: |
| 50 | + expression: "col_a + col_b = total" |
| 51 | + config: |
| 52 | + where: "created_at > '2018-12-31'" |
| 53 | +``` |
24 | 54 |
|
25 | 55 | ## Fixes
|
| 56 | +- Add star macro option to not encase column names in quotes. ([#706](https://github.com/dbt-labs/dbt-utils/pull/706)) |
| 57 | +- Explicitly stating the namespace for cross-db macros so that the dispatch logic works correctly by restoring the dbt. prefix for all migrated cross-db macros ([#701](https://github.com/dbt-labs/dbt-utils/pull/701)) |
26 | 58 | - Better handling of whitespaces in the star macro ([#651](https://github.com/dbt-labs/dbt-utils/pull/651))
|
27 | 59 | - Fix to correct behavior in `mutually_exclusive_ranges` test in certain situations when `zero_length_range_allowed: true` and multiple ranges in a partition have the same value for `lower_bound_column`. ([[#659](https://github.com/dbt-labs/dbt-utils/issues/659)], [#660](https://github.com/dbt-labs/dbt-utils/pull/660))
|
28 | 60 | - Fix to utilize dbt Core version of `escape_single_quotes` instead of version from dbt Utils ([[#689](https://github.com/dbt-labs/dbt-utils/issues/689)], [#692](https://github.com/dbt-labs/dbt-utils/pull/692))
|
29 | 61 |
|
30 | 62 | ## Contributors:
|
| 63 | +- [@CR-Lough] (https://github.com/CR-Lough) (#706) (#696) |
| 64 | +- [@fivetran-catfritz](https://github.com/fivetran-catfritz) |
| 65 | +- [@crowemi](https://github.com/crowemi) |
| 66 | +- [@SimonQuvang](https://github.com/SimonQuvang) (#701) |
31 | 67 | - [@christineberger](https://github.com/christineberger) (#624)
|
32 | 68 | - [@epapineau](https://github.com/epapineau) (#634)
|
33 | 69 | - [@courentin](https://github.com/courentin) (#651)
|
34 | 70 | - [@sfc-gh-ancoleman](https://github.com/sfc-gh-ancoleman) (#660)
|
35 | 71 | - [@zachoj10](https://github.com/zachoj10) (#692)
|
36 | 72 | - [@miles170](https://github.com/miles170)
|
37 |
| -- [@emilyriederer](https://github.com/emilyriederer) |
| 73 | +- [@emilyriederer](https://github.com/emilyriederer) |
38 | 74 |
|
39 | 75 | # dbt-utils v0.8.6
|
40 | 76 |
|
|
0 commit comments