view: int_dbt_prod_youtube_shorts { sql_table_name: INTELLIGENCE.DBT_PROD.YOUTUBE_SHORTS;; dimension_group: activity_date { view_label: "Date" description: "Date of consumption" label: "Activity" type: time sql: ${TABLE}.date ;; timeframes: [year, quarter, month, week, date, day_of_year, day_of_week, week_of_year, month_name, month_num, fiscal_month_num, fiscal_quarter, fiscal_quarter_of_year, fiscal_year] } dimension: channel_display_name { view_label: "Channel" description: "Name of the YT Channel" label: "Channel Display Name" type: string sql: ${TABLE}.channel_display_name ;; } dimension: channel_id { view_label: "Channel" description: "ID of the YT Channel" label: "Channel ID" type: string sql: ${TABLE}.channel_id ;; } dimension: video_title { view_label: "Video" label: "Video Title" description: "Video Title" type: string sql: ${TABLE}.video_title ;; } dimension: video_id { view_label: "Video" label: "Video ID" description: "Video ID" type: string sql: ${TABLE}.video_id ;; } dimension: asset_id { view_label: "Asset" label: "Asset ID" description: "Asset ID associated with the video" type: string sql: ${TABLE}.asset_id ;; } dimension: device_type { view_label: "Device" label: "Device Type ID" description: "Unique identifier for device type" type: number sql: ${TABLE}.device_type ;; } dimension: content_type { view_label: "Video" label: "Content Type" description: "UGC/ Partner-provided" type: string sql: ${TABLE}.content_type ;; } dimension: country_code { view_label: "Transaction Country" label: "Country Code" description: "ISO Code for country of consumption" type: string sql: ${TABLE}.country_code ;; hidden: yes } dimension: Artist { view_label: "Artist" label: "Artist Name" description: "Artist name as provided by the store" type: string sql: ${TABLE}.artist ;; hidden: yes } dimension: isrc { view_label: "Track" label: "ISRC" description: "Unique identifier for each track" type: string sql: ${TABLE}.isrc ;; hidden: yes } dimension: upc { view_label: "Release" label: "UPC" description: "Unique identifier for each release" type: string sql: ${TABLE}.upc ;; hidden: yes } dimension: claimed_status { view_label: "Claim" label: "Claimed Status" description: "The video is claimed or not by theorchard" type: string sql: ${TABLE}.claimed_status ;; } measure: views { view_label: "Metrics" label: "Views" description: "Number of views" type: sum sql: ${TABLE}.views ;; } measure: creations { view_label: "Metrics" label: "Creations" description: "Derived by taking the distinct count of Channel ID and ISRC for the time period given" type: count_distinct sql: concat(${TABLE}.channel_id, ${TABLE}.isrc) ;; } measure: watch_time_minutes { view_label: "Metrics" description: "Total watchtime in minutes" label: "Watch Time (Minutes)" type: sum sql: ${TABLE}.watch_time_minutes ;; } }