Skip to content

DBT Test: Relationships Crushing Facilities 2003 2025 Trase Id Trase Id Source Trase Storage Raw Municipality

DBT test name: relationships_crushing_facilities_2003_2025_TRASE_ID__trase_id__source_trase_storage_raw_municipality_

DBT details


Description

No description


Details

Models

Sources

Macros

  • test_relationships
  • get_where_subquery
{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias="relationships_crushing_facilit_5aabf82726c385f8c8827e3bd22ec9d8") }}
with child as (
    select TRASE_ID as from_field
    from "memory"."main"."crushing_facilities_2003_2025"
    where TRASE_ID is not null
),

parent as (
    select trase_id as to_field
    from 's3://trase-storage/brazil/dictionaries/municipality.csv'
)

select
    from_field

from child
left join parent
    on child.from_field = parent.to_field

where parent.to_field is null