From 84cf0f2971f5bf539b06c42373a5e80b59ba7047 Mon Sep 17 00:00:00 2001 From: Joel Labes Date: Tue, 6 Dec 2022 13:41:35 +1300 Subject: [PATCH] Update CHANGELOG.md --- CHANGELOG.md | 99 +++++++++++++++++++++++++++++++--------------------- 1 file changed, 60 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5a9a24f..db3b0c03 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,56 +8,32 @@ ## Contributors: ---> -# Unreleased +# dbt utils v1.0 + +## Migration Guide +The full migration guide is at https://docs.getdbt.com/guides/migration/versions/upgrading-to-dbt-utils-v1.0 ## New features -- Updated the `slugify` macro to prepend "_" to column names beginning with a number since most databases do not allow names to begin with numbers. -- 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) -- 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)) - New macro `get_single_value` ([#696](https://github.com/dbt-labs/dbt-utils/pull/696)) -- 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)) +- New macro safe_divide() — Returns null when the denominator is 0, instead of throwing a divide-by-zero error. - 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)) +## Enhancements +- 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) +- With the addition of an on-by-default quote_identifiers flag in the star() macro, you can now disable quoting if necessary. ([#706](https://github.com/dbt-labs/dbt-utils/pull/706)) + +## Fixes +- `union()` now includes/excludes columns case-insensitively +- The `expression_is_true test` doesn’t output * unless storing failures, a cost improvement for BigQuery ([#683](https://github.com/dbt-labs/dbt-utils/issues/683), [#686](https://github.com/dbt-labs/dbt-utils/pull/686)) +- Updated the `slugify` macro to prepend "_" to column names beginning with a number since most databases do not allow names to begin with numbers. + ## Under the hood - Remove deprecated table argument from `unpivot` ([#671](https://github.com/dbt-labs/dbt-utils/pull/671)) - Delete the deprecated identifier macro ([#672](https://github.com/dbt-labs/dbt-utils/pull/672)) - Handle deprecations in deduplicate macro ([#673](https://github.com/dbt-labs/dbt-utils/pull/673)) - Fully remove varargs usage in `surrogate_key` and `safe_add` ([#674](https://github.com/dbt-labs/dbt-utils/pull/674)) - Remove obsolete condition argument from `expression_is_true` ([#699](https://github.com/dbt-labs/dbt-utils/pull/699)) - -## Migration instructions -- If your project uses the `expression_is_true` macro, replace `condition` argument with `where`. - -Before: -```yaml -version: 2 - -models: - - name: model_name - tests: - - dbt_utils.expression_is_true: - expression: "col_a + col_b = total" - condition: "created_at > '2018-12-31'" -``` -After: -```yaml -version: 2 - -models: - - name: model_name - tests: - - dbt_utils.expression_is_true: - expression: "col_a + col_b = total" - config: - where: "created_at > '2018-12-31'" -``` - -## Fixes -- Add star macro option to not encase column names in quotes. ([#706](https://github.com/dbt-labs/dbt-utils/pull/706)) - 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)) -- Better handling of whitespaces in the star macro ([#651](https://github.com/dbt-labs/dbt-utils/pull/651)) -- 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)) -- 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)) ## Contributors: - [@CR-Lough] (https://github.com/CR-Lough) (#706) (#696) @@ -67,11 +43,56 @@ models: - [@christineberger](https://github.com/christineberger) (#624) - [@epapineau](https://github.com/epapineau) (#634) - [@courentin](https://github.com/courentin) (#651) -- [@sfc-gh-ancoleman](https://github.com/sfc-gh-ancoleman) (#660) - [@zachoj10](https://github.com/zachoj10) (#692) - [@miles170](https://github.com/miles170) - [@emilyriederer](https://github.com/emilyriederer) +# 0.9.5 +## Fixes +- Stop showing cross-db deprecation warnings for macros who have already been migrated ([#725](https://github.com/dbt-labs/dbt-utils/pull/725)) + +## 0.9.3 and 0.9.4 +Rolled back due to accidental incompatibilities +# dbt-utils 0.9.2 +## What's Changed +* Remove unnecessary generated new lines in `star` by @courentin in https://github.com/dbt-labs/dbt-utils/pull/651 +* fix: Actually suppress `union_relations` source_column_name when passing `none` by @kmclaugh in https://github.com/dbt-labs/dbt-utils/pull/661 +* Make `mutually_exclusive_ranges`' test deterministic by adding `upper_bound_column` to `order by` clause by @sfc-gh-ancoleman in https://github.com/dbt-labs/dbt-utils/pull/660 +* update union_relations to use core string literal macro by @dave-connors-3 in https://github.com/dbt-labs/dbt-utils/pull/665 +* Add where clause example to get_column_values documentation by @arsenkhy in https://github.com/dbt-labs/dbt-utils/pull/623 + +## New Contributors +* @courentin made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/651 +* @kmclaugh made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/661 +* @sfc-gh-ancoleman made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/660 +* @dave-connors-3 made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/665 +* @arsenkhy made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/623 + +# dbt-utils 0.9.1 +## Fixes +- Remove cross-db dbt_utils references by @clausherther in #650 + +# dbt-utils 0.9.0 +## Changed functionality +* 🚨 (Almost all) cross-db macros are now implemented in dbt Core instead of dbt-utils. A backwards-compatibility layer remains for now and will be removed in dbt utils 1.0 later this year. Completed by @dbeatty10 and @jtcohen6 in https://github.com/dbt-labs/dbt-utils/pull/597, https://github.com/dbt-labs/dbt-utils/pull/586 and https://github.com/dbt-labs/dbt-utils/pull/615 + * See #487 for further discussion on the backstory + * If you are a package maintainer with a dependency on these macros, prepare for their removal by switching to `{{ dbt.some_macro() }}`. Refer to [#package-ecosystem in the Community Slack](https://getdbt.slack.com/archives/CU4MRJ7QB/p1658467817852129) for further assistance +* Feature: Add option to remove the `source_column_name` on the `union_relations` macro by @christineberger in https://github.com/dbt-labs/dbt-utils/pull/624 + +## Fixes +* Use adapter.quote() instead of hardcoded BQ quoting for get_table_types_sql by @alla-bongard in https://github.com/dbt-labs/dbt-utils/pull/636 + +## Documentation +* standardize yml indentation under the 'models:' line on the README by @leoebfolsom in https://github.com/dbt-labs/dbt-utils/pull/613 +* Use MADR 3.0.0 for formatting decision records by @dbeatty10 in https://github.com/dbt-labs/dbt-utils/pull/614 +* Docs cleanup by @dbeatty10 in https://github.com/dbt-labs/dbt-utils/pull/620 +* Add not_accepted_values to README ToC by @david-beallor in https://github.com/dbt-labs/dbt-utils/pull/646 + +# New Contributors +* @leoebfolsom made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/613 +* @christineberger made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/624 +* @alla-bongard made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/636 +* @david-beallor made their first contribution in https://github.com/dbt-labs/dbt-utils/pull/646 # dbt-utils v0.8.6 ## New features