Skip to content

DBT Test: Dbt Utils Accepted Range Comtrade Exports Quantity Unit Code 100 1

DBT test name: dbt_utils_accepted_range_comtrade_exports_quantity_unit_code__100___1

DBT details


Description

No description


Details

Models

Macros

  • test_accepted_range
  • get_where_subquery
{{ dbt_utils.test_accepted_range(**_dbt_generic_test_kwargs) }}{{ config(alias="dbt_utils_accepted_range_comtr_71bc2a0958993c7372f2c5dc7c1bbb38") }}
with meet_condition as(
  select *
  from "trase_production"."main"."comtrade_exports"
),

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 quantity_unit_code >= -1
    -- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.
    or not quantity_unit_code <= 100
)

select *
from validation_errors