DBT Test: Dbt Utils Accepted Range Brazil Bol 2023 Gold Date Cast 2023 12 31 As Date Cast 2023 01 01 As Date
DBT test name: dbt_utils_accepted_range_brazil_bol_2023_gold_date__CAST_2023_12_31_AS_DATE___CAST_2023_01_01_AS_DATE_
DBT details
-
Kind:
generic(accepted_range) -
Column under test:
date -
Test file: trase/data_pipeline/models/brazil/trade/bol/_schema_brazil_bol.yml
Description
No description
Details
{{ dbt_utils.test_accepted_range(**_dbt_generic_test_kwargs) }}{{ config(where="date IS NOT NULL",alias="dbt_utils_accepted_range_brazi_af703ece809337ba1bcda098a0b2b005") }}
with meet_condition as(
select *
from (select * from "trase_production"."main_brazil"."brazil_bol_2023_gold" where date IS NOT NULL) 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 date >= CAST('2023-01-01' AS DATE)
-- records with a value <= max_value are permitted. The `not` flips this to find records that don't meet the rule.
or not date <= CAST('2023-12-31' AS DATE)
)
select *
from validation_errors