DBT Test: Dbt Utils Relationships Where Brazil Bol 2023 Mdic Padded Exporter State Trase Id Trase Id Ref Postgres Regions Without Geometry Level 3 And Country Brazil
DBT test name: dbt_utils_relationships_where_brazil_bol_2023_mdic_padded_exporter_state_trase_id__trase_id__ref_postgres_regions_without_geometry___level_3_AND_country_BRAZIL_
DBT details
-
Kind:
generic(relationships_where) -
Column under test:
exporter_state_trase_id -
Test file: trase/data_pipeline/models/brazil/trade/bol/_schema_brazil_bol.yml
Description
No description
Details
Models
Macros
test_relationships_whereget_where_subquery
{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias="dbt_utils_relationships_where__5d18e62011851c6268b85ef00db7b4d9") }}
with left_table as (
select
exporter_state_trase_id as id
from "trase_production"."main_brazil"."brazil_bol_2023_mdic_padded"
where exporter_state_trase_id is not null
and 1=1
),
right_table as (
select
trase_id as id
from "trase_production"."main"."postgres_regions_without_geometry"
where trase_id is not null
and level = 3 AND country = 'BRAZIL'
),
exceptions as (
select
left_table.id,
right_table.id as right_id
from left_table
left join right_table
on left_table.id = right_table.id
where right_table.id is null
)
select * from exceptions