DBT Test: Relationships Diet Trase Coffee 2020 Other Country Of Production Name Country Name Ref Postgres Countries
DBT test name: relationships_diet_trase_coffee_2020_other_country_of_production_name__country_name__ref_postgres_countries_
DBT details
-
Kind:
generic(relationships) -
Column under test:
country_of_production_name -
Test file: trase/data_pipeline/models/diet_trase/results/_schema.yml
Description
No description
Details
{{ test_relationships(**_dbt_generic_test_kwargs) }}{{ config(alias="relationships_diet_trase_coffe_a03bb20af99e0d74599e1ee487f8b2e6") }}
with child as (
select country_of_production_name as from_field
from "trase_production"."main"."diet_trase_coffee_2020_other"
where country_of_production_name 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