data-dwh-dbt-project/macros/tests/not_negative.sql

7 lines
187 B
MySQL
Raw Normal View History

2024-06-20 14:43:51 +02:00
{% test not_negative(model, column_name) %}
with validation as (select {{ column_name }} as value from {{ model }})
select *
from validation
where value < 0
{% endtest %}