Skip to content

DBT Test: Dbt Utils Not Null Proportion Brazil Bol 2023 Silver 0 8 Port Of Import Name

DBT test name: dbt_utils_not_null_proportion_brazil_bol_2023_silver_0_8__port_of_import_name

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__bf6724fd1533206d9029e883a99ea7b9") }}
with validation as (
  select

    sum(case when port_of_import_name 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.8 or not_null_proportion > 1
)
select
  *
from validation_errors