mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
26 lines
301 B
SQL
26 lines
301 B
SQL
{% test is_positive(model, column_name) %}
|
|
|
|
with validation as (
|
|
|
|
select
|
|
{{ column_name }} as value_field
|
|
|
|
from {{ model }}
|
|
|
|
),
|
|
|
|
validation_errors as (
|
|
|
|
select
|
|
value_field
|
|
|
|
from validation
|
|
|
|
where value_field < 0
|
|
|
|
)
|
|
|
|
select *
|
|
from validation_errors
|
|
|
|
{% endtest %} |