view: cm_orchard_join { sql_table_name: intelligence.dbt_prod.cm_orchard_join ;; dimension: chartmetricid { type: number description: "Chartmetric Artist ID. This is synonomous with cm_artist in Chartmetrics raw data." hidden: yes sql: ${TABLE}.chartmetricid ;; } dimension: labelid { label: "Label ID" description: "The Orchard assigned Label ID." type: number sql: ${TABLE}.labelid ;; value_format: "#" } dimension: upc { label: "UPC" description: "Releases universal product code. This is synonomous with 'barcode'." type: number sql: ${TABLE}.upc ;; value_format: "#" } dimension: release_id { label: "Realease_ID" description: "The Orchard assigned Release ID." type: number sql: ${TABLE}.release_id ;; value_format: "#" } dimension: subaccountid { label: "Subaccount ID" description: "The Orchard assigned Sub-Account ID" type: number sql: ${TABLE}.subaccountid ;; value_format: "#" } dimension: artistid { label: "Artist ID" description: "The Orchard assigned Artist ID" type: number sql: ${TABLE}.artist_id ;; value_format: "#" } # dimension: name { # type: string # hidden: yes # sql: ${TABLE}.name ;; # } dimension: artistname { label: "Artist Name" description: "The name of the artist." type: string sql: ${TABLE}.artistname ;; } dimension: isrc { hidden: yes description: "The tracks ISRC" type: string sql: ${TABLE}.isrc ;; } dimension: isorchard { label: "Is the artist distributed by The Orchard (Y/N)" type: string case: { when: { sql: ${TABLE}.chartmetricid is not null;; #given the filter in the dbt model, this will always appear as 'Yes'. label: "Yes" } else: "No"} } }