Skip to content

DBT Test: Brazil Mdic Port 2023 Via Fkey

DBT test name: brazil_mdic_port_2023_via_fkey

DBT details


Description

No description


Details

Models

Sources

Macros

  • test_relationships
  • get_where_subquery
{{ test_relationships(**_dbt_generic_test_kwargs) }}
with child as (
    select via as from_field
    from "trase_production"."main_brazil"."brazil_mdic_port_2023"
    where via is not null
),

parent as (
    select mdic_via_code as to_field
    from read_csv('s3://trase-storage/brazil/trade/mdic/port/mdic_via_codes.csv', all_varchar=true)
)

select
    from_field

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

where parent.to_field is null