Skip to content

DBT Test: Dbt Utils Unique Combination Of Columns Diet Trase Coffee Trade Consolidated 2020 Year Producing Country Hs6 Exporter Label Exporter Group Name Port Of Export Label Port Of Export Name Country Of Destination Economic Bloc Importer Label Importer Name Importer Group

DBT test name: dbt_utils_unique_combination_of_columns_diet_trase_coffee_trade_consolidated_2020_year__producing_country__hs6__exporter_label__exporter_group_name__port_of_export_label__port_of_export_name__country_of_destination__economic_bloc__importer_label__importer_name__importer_group

DBT details


Description

No description


Details

Models

Macros

  • test_unique_combination_of_columns
  • get_where_subquery
{{ dbt_utils.test_unique_combination_of_columns(**_dbt_generic_test_kwargs) }}{{ config(alias="dbt_utils_unique_combination_o_04d068d5bd5d8612fbf361a8b54691b4") }}
with validation_errors as (

    select
        year, producing_country, hs6, exporter_label, exporter_group_name, port_of_export_label, port_of_export_name, country_of_destination, economic_bloc, importer_label, importer_name, importer_group
    from "trase_production"."main"."diet_trase_coffee_trade_consolidated_2020"
    group by year, producing_country, hs6, exporter_label, exporter_group_name, port_of_export_label, port_of_export_name, country_of_destination, economic_bloc, importer_label, importer_name, importer_group
    having count(*) > 1

)

select *
from validation_errors