Skip to content

DBT Test: Dbt Utils Relationships Where Diet Trase Full Coffee Production 2020 Geocode Geocode Ref Diet Trase Subnational Regions

DBT test name: dbt_utils_relationships_where_diet_trase_full_coffee_production_2020_geocode__geocode__ref_diet_trase_subnational_regions_

DBT details


Description

No description


Details

Models

Macros

  • test_relationships_where
  • get_where_subquery
{{ dbt_utils.test_relationships_where(**_dbt_generic_test_kwargs) }}{{ config(alias="dbt_utils_relationships_where__70bd8dfe4d1cc69c362ac55245811f17") }}
with left_table as (

  select
    geocode as id

  from "trase_production"."main"."diet_trase_full_coffee_production_2020"

  where geocode is not null
    and 1=1

),

right_table as (

  select
    geocode as id

  from "trase_production"."main"."diet_trase_subnational_regions"

  where geocode is not null
    and 1=1

),

exceptions as (

  select
    left_table.id,
    right_table.id as right_id

  from left_table

  left join right_table
         on left_table.id = right_table.id

  where right_table.id is null

)

select * from exceptions