{% test not_negative(model, column_name) %} with validation as (select {{ column_name }} as value from {{ model }}) select * from validation where value < 0 {% endtest %}