Skip to content

Commit

Permalink
Merge pull request #101 from CamronBorealis/main
Browse files Browse the repository at this point in the history
Avoid equal_expression from failing dbt tests based on it
  • Loading branch information
sdebruyn authored Sep 7, 2024
2 parents bd13422 + 5e7a81c commit 7d86567
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,17 @@
{% endif %}
{% endmacro -%}

{%- macro sqlserver__test_equal_expression(model, expression,
{%- macro sqlserver__test_equal_expression(
model,
expression,
compare_model,
compare_expression,
group_by,
compare_group_by,
row_condition,
compare_row_condition,
tolerance,
tolerance_percent,
return_difference) -%}
tolerance_percent) -%}

{%- set compare_model = model if not compare_model else compare_model -%}
{%- set compare_expression = expression if not compare_expression else compare_expression -%}
Expand Down Expand Up @@ -71,11 +72,7 @@
-- DEBUG:
-- select * from final
select
{% if return_difference %}
coalesce(sum(expression_difference), 0)
{% else %}
count(*)
{% endif %}
*
from final
where
{% if tolerance_percent %}
Expand Down

0 comments on commit 7d86567

Please sign in to comment.