diff --git a/CHANGELOG.md b/CHANGELOG.md index b7799278..ea5c466e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ * Improve the performance of the `at_least_one` test by pruning early. This is especially helpful when running against external tables. By @joshuahuntley in https://github.com/dbt-labs/dbt-utils/pull/775 ## Fixes * Fix legacy links in README by @dbeatty10 in https://github.com/dbt-labs/dbt-utils/pull/796 +* Fixed false positive in not_constant test when using groupings and a grouping has only one row by @igor-lobanov-maersk https://github.com/dbt-labs/dbt-utils/issues/848 # dbt utils v1.1.0 ## What's Changed diff --git a/macros/generic_tests/not_constant.sql b/macros/generic_tests/not_constant.sql index c3a976bf..b8da215c 100644 --- a/macros/generic_tests/not_constant.sql +++ b/macros/generic_tests/not_constant.sql @@ -22,6 +22,6 @@ from {{ model }} {{groupby_gb_cols}} having count(distinct {{ column_name }}) = 1 - + and count(1) > 1 {% endmacro %}