DBT Test: Relationships Diet Trase Coffee Trade Padded 2020 Producing Country Country Name Ref Postgres Countries
DBT test name: relationships_diet_trase_coffee_trade_padded_2020_producing_country__country_name__ref_postgres_countries_
DBT details
-
Kind:
generic(relationships) -
Column under test:
producing_country -
Test file: trase/data_pipeline/models/diet_trase/_schema.yml
Description
No description
Details
Models
Macros
test_relationshipsget_where_subquery
{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias="relationships_diet_trase_coffe_b9d12343df81d4422da8ca718e0d9e5b") }}
with child as (
select producing_country as from_field
from "trase_production"."main"."diet_trase_coffee_trade_padded_2020"
where producing_country is not null
),
parent as (
select country_name as to_field
from "trase_production"."main"."postgres_countries"
)
select
from_field
from child
left join parent
on child.from_field = parent.to_field
where parent.to_field is null