Skip to content

DBT Test: Dbt Utils Not Null Proportion Brazil Bol 2023 Silver 0 99 Exporter State Label

DBT test name: dbt_utils_not_null_proportion_brazil_bol_2023_silver_0_99__exporter_state_label

DBT details


Description

No description


Details

Models

Macros

  • test_not_null_proportion
  • get_where_subquery
{{ dbt_utils.test_not_null_proportion(**_dbt_generic_test_kwargs) }}{{ config(alias="dbt_utils_not_null_proportion__58e0f3a43dd1cad76983ad375bdf826e") }}
with validation as (
  select

    sum(case when exporter_state_label is null then 0 else 1 end) / cast(count(*) as numeric(28,6)) as not_null_proportion
  from "trase_production"."main_brazil"."brazil_bol_2023_silver"

),
validation_errors as (
  select

    not_null_proportion
  from validation
  where not_null_proportion < 0.99 or not_null_proportion > 1
)
select
  *
from validation_errors