Skip to content

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

DBT test name: dbt_utils_not_null_proportion_brazil_bol_2024_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__cd4a6fe5fd4e8b7f846f83abe7b35087") }}
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 "memory"."main"."brazil_bol_2024_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