mirror of
https://gitlab.com/cief-data/dbt_cloud.git
synced 2026-08-19 04:14:00 +00:00
DBT structure change
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{% 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 %}
|
||||
Reference in New Issue
Block a user