view: dt_product_territory_split { sql_table_name: INTELLIGENCE.DBT_PROD.DT_PRODUCT_TERRITORY_SPLIT ;; # derived_table: { # sql: # select ts.product_territory_split_id, ts.vendor_id, ts.product_id, ts.country_id, c.name as country, ROUND(1-ts.split_rate,2) as product_split_rate # from ORCHARD_APP_REPORTING_V2.ART_RELATIONS_PROD_ART_RELATIONS.PRODUCT_TERRITORY_SPLIT ts # left join orchard_app_reporting_v2.art_relations_prod_art_relations.country c on c.id = ts.country_id;; # } dimension: product_territory_split_id { type: number hidden: yes primary_key: yes sql: ${TABLE}.product_territory_split_id ;; } dimension: vendor_id { type: number hidden: yes sql: ${TABLE}.vendor_id ;; } dimension: product_id { type: number hidden: yes sql: ${TABLE}.product_id ;; } dimension: country_id { type: number hidden: yes sql: ${TABLE}.country_id ;; } dimension: country { type: string hidden: no label: "Product Territory Split Country" sql: ${TABLE}.country ;; } dimension: product_split_rate { type: number label: "Product Split Rate" sql: ${TABLE}.product_split_rate ;; } }