Skip to content

Commit

Permalink
Update equals.sql macro
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianburusdbt committed Dec 17, 2024
1 parent 7e816be commit 70afd18
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions dbt/include/global_project/macros/utils/equals.sql
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{% macro equals(first_date, second_date, datepart) -%}
{{ return(adapter.dispatch('equals', 'dbt') (expression)) }}
{% macro equals(first_date, second_date, datepart) %}
{{ return(adapter.dispatch('equals', 'dbt') (expr1, expr2)) }}
{%- endmacro %}

{% macro defaults__equals(expr1, expr2) -%}
case when (({{ expr1 }} = {{ expr2 }}) or ({{ expr1 }} is null and {{ expr2 }} is null))
then 0
else 1
end = 0
{% endmacro %}
{% macro default__equals(expr1, expr2) -%}

case when (({{ expr1 }} = {{ expr2 }}) or ({{ expr1 }} is null and {{ expr2 }} is null))
then 0
else 1
end = 0

{% endmacro %}

0 comments on commit 70afd18

Please sign in to comment.