view: dt_bits_per_sample { sql_table_name: INTELLIGENCE.DBT_PROD.BITS_PER_SAMPLE ;; # derived_table: { # sql: WITH sample_rates AS (SELECT # a.upc, # ald.bits_per_sample #FROM orchard_app_reporting_v2.reportsdd_direct_delivery.asset a #INNER JOIN orchard_app_reporting_v2.reportsdd_direct_delivery.asset_location al ON al.asset_id=a.asset_id #INNER JOIN orchard_app_reporting_v2.reportsdd_direct_delivery.asset_location_detail ald ON ald.asset_location_id=al.asset_location_id) # #SELECT # upc, # LISTAGG(DISTINCT bits_per_sample, '; ') WITHIN GROUP (ORDER BY bits_per_sample) AS bits_per_sample #FROM sample_rates #GROUP BY 1;; # } dimension: upc { hidden: yes type: number primary_key: yes sql: ${TABLE}.upc ;; } dimension: bits_per_sample { type: string label: "Bit Rate" view_label: "Release" description: "Bit Rates a particular UPC has been delivered in" sql: ${TABLE}.bits_per_sample ;; } }