new not_negative test
This commit is contained in:
parent
c671701071
commit
34b678df26
1 changed files with 6 additions and 0 deletions
6
macros/tests/not_negative.sql
Normal file
6
macros/tests/not_negative.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{% test not_negative(model, column_name) %}
|
||||||
|
with validation as (select {{ column_name }} as value from {{ model }})
|
||||||
|
select *
|
||||||
|
from validation
|
||||||
|
where value < 0
|
||||||
|
{% endtest %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue