Skip to content

Commit

Permalink
allow assert_not_null to be overriden (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
chaimt authored Sep 19, 2021
1 parent f391be1 commit d84e80b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion macros/etc/assert_not_null.sql
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{% macro assert_not_null(function, arg) %}
{% macro assert_not_null(function, arg) -%}
{{ return(adapter.dispatch('assert_not_null', 'spark_utils')(function, arg)) }}
{%- endmacro %}

{% macro default__assert_not_null(function, arg) %}

coalesce({{function}}({{arg}}), nvl2({{function}}({{arg}}), assert_true({{function}}({{arg}}) is not null), null))

Expand Down

0 comments on commit d84e80b

Please sign in to comment.