diff --git a/macros/generic_tests/equal_rowcount.sql b/macros/generic_tests/equal_rowcount.sql index 600eae23..1db18735 100644 --- a/macros/generic_tests/equal_rowcount.sql +++ b/macros/generic_tests/equal_rowcount.sql @@ -5,7 +5,7 @@ {% macro default__test_equal_rowcount(model, compare_model, group_by_columns) %} {#-- Needs to be set at parse time, before we return '' below --#} -{{ config(fail_calc = 'sum(coalesce(diff_count, 0))') }} +{{ config(fail_calc = 'coalesce(sum(diff_count), 0)') }} {#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #} {%- if not execute -%}