view: track_credit_snowflake { derived_table: { sql:select role, crew_or_cast, track_id, amg_id, id, url, billing, listagg(distinct artist_first_name || ' ' || artist_last_name, ', ') as artist_name from orchard_app_reporting_v2.art_relations_prod_art_relations.track_credit group by 1, 2, 3, 4, 5, 6, 7;; } measure: count { type: count drill_fields: [detail*] } dimension: role { type: string sql: ${TABLE}.ROLE ;; } dimension: crew_or_cast { type: string sql: ${TABLE}.CREW_OR_CAST ;; } dimension: track_id { type: number sql: ${TABLE}.TRACK_ID ;; } dimension: artist_name_director { label: "Video Director" type: string sql: ${TABLE}.ARTIST_NAME ;; } dimension: artist_name_producer { label: "Video Producer" type: string sql: ${TABLE}.ARTIST_NAME ;; } dimension: artist_name_editor { label: "Video Editor" type: string sql: ${TABLE}.ARTIST_NAME ;; } dimension: artist_name_other { label: "Video Other" description: "Video Roles not including 'Director', 'Producer', or 'Editor'" type: string sql: ${TABLE}.ARTIST_NAME ;; } dimension: amg_id { type: string sql: ${TABLE}.AMG_ID ;; } dimension: id { type: number sql: ${TABLE}.ID ;; } dimension: url { type: string sql: ${TABLE}.URL ;; } dimension: billing { type: string sql: ${TABLE}.BILLING ;; } set: detail { fields: [ role, crew_or_cast, track_id, amg_id, id, url, billing ] } }