Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions macros/generic_tests/equal_rowcount.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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 = 'sum(diff_count)') }}

{#-- Prevent querying of db in parsing mode. This works because this macro does not create any new refs. #}
{%- if not execute -%}
Expand Down Expand Up @@ -60,7 +60,7 @@ final as (

count_a,
count_b,
abs(count_a - count_b) as diff_count
abs(coalesce(count_a, 0) - coalesce(count_b, 0)) as diff_count

from a
full join b
Expand Down
Loading