Skip to content

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

DBT test name: relationships_crushing_facilities_2003_2024_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_2ca56c2ebe582412a8da487c9dc350d0") }}
with child as (
    select TRASE_ID as from_field
    from "memory"."main"."crushing_facilities_2003_2024"
    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