init
This commit is contained in:
7
dbt/macros/error_handlers/check_null.sql
Normal file
7
dbt/macros/error_handlers/check_null.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
{% macro check_null(var_name, var_value) %}
|
||||
{% if var_value == None or var_value | string == '' %}
|
||||
{{ elog("Macro local variable " ~ var_name ~ " is empty!", "ERR", 0)}}
|
||||
{{ exceptions.raise_compiler_error("Variable " ~ var_name ~ " is empty!") }}
|
||||
{% endif %}
|
||||
|
||||
{% endmacro %}
|
||||
7
dbt/macros/error_handlers/check_variable.sql
Normal file
7
dbt/macros/error_handlers/check_variable.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
{% macro check_variable(var_name) %}
|
||||
|
||||
{% if var(var_name, none) is none %}
|
||||
{{ exceptions.raise_compiler_error("The required global variable " ~ var_name ~ " hasn't been provided!") }}
|
||||
{% endif %}
|
||||
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user