From 150687a0cb75d1e52e58b82006bbe7012bb33323 Mon Sep 17 00:00:00 2001 From: Mahilaeshwar Date: Sun, 8 Dec 2024 16:19:06 +0530 Subject: [PATCH] fix quick_are_queries_identical macro for BigQuery Fix for issue https://github.com/dbt-labs/dbt-audit-helper/issues/117 --- macros/quick_are_queries_identical.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/quick_are_queries_identical.sql b/macros/quick_are_queries_identical.sql index a0800c3d..6d07297c 100644 --- a/macros/quick_are_queries_identical.sql +++ b/macros/quick_are_queries_identical.sql @@ -36,7 +36,7 @@ but it's a good way to quickly verify identical results if that's what you're ex {{ audit_helper.event_time_filter(event_time_props) }} ) - select count(distinct hash_result) = 1 as are_tables_identical + select count(distinct IFNULL(hash_result,0)) = 1 as are_tables_identical from ( select bit_xor(farm_fingerprint(to_json_string(query_a))) as hash_result from query_a @@ -67,4 +67,4 @@ but it's a good way to quickly verify identical results if that's what you're ex {{ audit_helper.event_time_filter(event_time_props) }} ) as hashes -{% endmacro %} \ No newline at end of file +{% endmacro %}