DBT Test: Dbt Expectations Expect Column Sum To Be Between Brazil Soy V2 7 0 Supply Chain Soy Deforestation Planting Year 5y Amortised Exposure Ha Year 0 True
DBT test name: dbt_expectations_expect_column_sum_to_be_between_brazil_soy_v2_7_0_supply_chain_soy_deforestation_planting_year_5y_amortised_exposure_ha__year__0__True
DBT details
-
Kind:
generic(expect_column_sum_to_be_between) -
Column under test:
soy_deforestation_planting_year_5y_amortised_exposure_ha -
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_ec0562c9424af0c4ba5c164db0e0481c") }}
with grouped_expression as (
select
year as col_1,
( 1=1 and sum(soy_deforestation_planting_year_5y_amortised_exposure_ha) > 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