view: dt_flatten_country_region {
  derived_table: {
    sql:
SELECT id, name
FROM orchard_app_reporting_v2.art_relations_prod_art_relations.country
UNION ALL
SELECT DISTINCT country_id, country_name
FROM orchard_app_reporting_v2.prod_sales_goals_sales_goals.digital_marketing_projections_by_country
WHERE country_id >= 1000 ;;
  }

  dimension: country_region_id {
    type: number
    sql: ${TABLE}.id ;;
    primary_key: yes
    hidden: yes
  }

  dimension: country_region_name {
    label: "
    {% if _view._name == 'market_country' %} Priority Country
    {% else %} Country Name {% endif %}
    "
    type: string
    sql: ${TABLE}.name ;;
  }
}