DBT Test: Sicasq 2026 Trase Id In Ibge Municipalities 2023
DBT test name: sicasq_2026_trase_id_in_ibge_municipalities_2023
DBT details
-
Kind:
generic(relationships_where) -
Column under test:
trase_id -
Test file: trase/data_pipeline/models/_sources_trase_storage.yml
-
Tags:
brazil_soy_2022_2025_update
Description
No description
Details
Models
Sources
Macros
test_relationships_whereget_where_subquery
{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}
with left_table as (
select
trase_id as id
from 's3://trase-storage/brazil/logistics/sicasq/out/SICASQ_2026.csv'
where trase_id is not null
and 1=1
),
right_table as (
select
trase_id as id
from "memory"."main"."brazil_ibge_municipalities_gold"
where trase_id is not null
and year = 2023
),
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