DBT Test: Dbt Expectations Expect Column Sum To Be Between Brazil Soy V2 7 0 Supply Chain Soy Deforestation 5 Year Total Exposure Year 0 True
DBT test name: dbt_expectations_expect_column_sum_to_be_between_brazil_soy_v2_7_0_supply_chain_soy_deforestation_5_year_total_exposure__year__0__True
DBT details
-
Kind:
generic(expect_column_sum_to_be_between) -
Column under test:
soy_deforestation_5_year_total_exposure -
Test file: trase/data_pipeline/models/brazil/soy/data_packages/brazil_soy_v2_7_0/_schema.yml
Description
No description
Details
Models
Macros
test_expect_column_sum_to_be_betweenget_where_subquery
{{ dbt_expectations.test_expect_column_sum_to_be_between(**_dbt_generic_test_kwargs) }}{{ config(alias="dbt_expectations_expect_column_10a8d5c10f6fbb9645d1408f47fd81c8") }}
with grouped_expression as (
select
year as col_1,
( 1=1 and sum(soy_deforestation_5_year_total_exposure) > 0
)
as expression
from "memory"."main"."brazil_soy_v2_7_0_supply_chain"
group by
year
),
validation_errors as (
select
*
from
grouped_expression
where
not(expression = true)
)
select *
from validation_errors