Skip to content

DBT Test: Dbt Utils Accepted Range Brazil Bol 2023 Mdic Padded Net Weight Tonnes 100000000 0 0001

DBT test name: dbt_utils_accepted_range_brazil_bol_2023_mdic_padded_net_weight_tonnes__100000000__0_0001

DBT details


Description

No description


Details

Models

Macros

  • test_accepted_range
  • get_where_subquery
{{ dbt_utils.test_accepted_range(**_dbt_generic_test_kwargs) }}{{ config(where="padded = false",alias="dbt_utils_accepted_range_brazi_c06fade3f2759c6da8a3f5166bd04522") }}
with meet_condition as(
  select *
  from (select * from "trase_production"."main_brazil"."brazil_bol_2023_mdic_padded" where padded = false) dbt_subquery
),

validation_errors as (
  select *
  from meet_condition
  where
    -- never true, defaults to an empty result set. Exists to ensure any combo of the `or` clauses below succeeds
    1 = 2
    -- records with a value >= min_value are permitted. The `not` flips this to find records that don't meet the rule.
    or not net_weight_tonnes >= 0.0001
    -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.
    or not net_weight_tonnes <= 100000000
)

select *
from validation_errors