diff --git a/macros/tests/not_negative.sql b/macros/tests/not_negative.sql new file mode 100644 index 0000000..4ac9523 --- /dev/null +++ b/macros/tests/not_negative.sql @@ -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 %}