view: int_dev_awalspotify_awaldiscovery_v04ebba { sql_table_name: INTELLIGENCE.DEV_AWALSPOTIFY.AWALDISCOVERY_V04EBBA ;; dimension: TRACK_NAME { view_label: "Track" label: "Track Name" type: string sql: ${TABLE}.TRACK_NAME ;; } dimension: ARTIST_NAME { view_label: "Track" label: "Artist Name" type: string sql: ${TABLE}.ARTIST_NAME ;; } dimension: ISRC { view_label: "Track" label: "ISRC" type: string sql: ${TABLE}.ISRC ;; } dimension_group: CAMPAIGN_START { view_label: "Date" label: "Campaign Start Date" type: time sql: ${TABLE}.CAMPAIGN_START ;; 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_group: CAMPAIGN_END { view_label: "Date" label: "Campaign End Date" type: time sql: ${TABLE}.CAMPAIGN_END ;; 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: CAMPAIGN_DURATION_MONTHS { view_label: "Campaign" label: "Campaign Duration Months" type: string sql: ${TABLE}.CAMPAIGN_DURATION_MONTHS ;; } dimension_group: TRACK_RELEASE_DATE { view_label: "Date" label: "Track Release Date" type: time sql: ${TABLE}.TRACK_RELEASE_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: DISCOVERYGROUP { view_label: "Discovery Group" label: "Discovery Group" type: string sql: ${TABLE}.DISCOVERYGROUP ;; } dimension_group: CAMPAIGN3MOSBEFORE { view_label: "Campaign" label: "3 Months before" type: time sql: ${TABLE}.CAMPAIGN3MOSBEFORE ;; 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_group: CAMPAIGN3MOSAFTER { view_label: "Campaign" label: "3 Months After" type: time sql: ${TABLE}.CAMPAIGN3MOSAFTER ;; 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_group: FIRSTUSERDISCOVERYDATE { view_label: "Date" label: "First User Discovery Date" type: time sql: ${TABLE}.FIRSTUSERDISCOVERYDATE ;; 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: IYEAR { view_label: "Date" label: "year" type: string sql: ${TABLE}.IYEAR ;; } dimension: IMONTH { view_label: "Date" label: "Month" type: string sql: ${TABLE}.IMONTH ;; } dimension: SPOTIFY_SOURCE { view_label: "Track" label: "Spotify Source" type: string sql: ${TABLE}.SPOTIFY_SOURCE ;; } dimension: SOURCE_URI { view_label: "Track" label: "SOURCE_URI" type: string sql: ${TABLE}.SOURCE_URI ;; } dimension: SPOTIFYISRC { view_label: "Track" label: "SPOTIFYISRC" type: string sql: ${TABLE}.SPOTIFYISRC ;; } dimension: UPC { view_label: "Release" label: "UPC" type: string sql: ${TABLE}.UPC ;; } dimension: LABELID { view_label: "Label" label: "Label id" type: string sql: ${TABLE}.LABELID ;; } dimension: USER_ID { view_label: "User" label: "User Id" type: string sql: ${TABLE}.USER_ID ;; } dimension: USER_COUNTRY_CODE { view_label: "User" label: "USER_COUNTRY_CODE" type: string sql: ${TABLE}.USER_COUNTRY_CODE ;; } dimension: USER_ACCOUNT_TYPE { view_label: "User" label: "User Account Type" type: string sql: ${TABLE}.USER_ACCOUNT_TYPE ;; } dimension: USER_GENDER { view_label: "User" label: "Gender" type: string sql: ${TABLE}.USER_GENDER ;; } dimension: USER_BIRTH_YEAR { view_label: "User" label: "Birth Year" type: string sql: ${TABLE}.USER_BIRTH_YEAR ;; } dimension: LICENSOR { view_label: "LICENSOR" label: "LICENSOR" type: string sql: ${TABLE}.LICENSOR ;; } dimension: USER_AGE_GROUP { view_label: "User" label: "Age Group" type: string sql: ${TABLE}.USER_AGE_GROUP ;; } measure: SHUFFLE_PLAY_YES_STREAMS{ view_label: "Units" label: "SHUFFLE_PLAY_YES_STREAMS" type: sum sql: ${TABLE}.SHUFFLE_PLAY_YES_STREAMS ;; } measure: SHUFFLE_PLAY_NO_STREAMS{ view_label: "Units" label: "SHUFFLE_PLAY_NO_STREAMS" type: sum sql: ${TABLE}.SHUFFLE_PLAY_NO_STREAMS ;; } measure: SHUFFLE_PLAY_NULL_STREAMS{ view_label: "Units" label: "SHUFFLE_PLAY_NULL_STREAMS" type: sum sql: ${TABLE}.SHUFFLE_PLAY_NULL_STREAMS ;; } measure: REPEAT_PLAY_YES_STREAMS{ view_label: "Units" label: "REPEAT_PLAY_YES_STREAMS" type: sum sql: ${TABLE}.REPEAT_PLAY_YES_STREAMS ;; } measure: REPEAT_PLAY_NO_STREAMS{ view_label: "Units" label: "REPEAT_PLAY_NO_STREAMS" type: sum sql: ${TABLE}.REPEAT_PLAY_NO_STREAMS ;; } measure: REPEAT_PLAY_NULL_STREAMS{ view_label: "Units" label: "REPEAT_PLAY_NULL_STREAMS" type: sum sql: ${TABLE}.REPEAT_PLAY_NULL_STREAMS ;; } measure: DISCOVERY_FLAG_YES_STREAMS{ view_label: "Units" label: "DISCOVERY_FLAG_YES_STREAMS" type: sum sql: ${TABLE}.DISCOVERY_FLAG_YES_STREAMS ;; } measure: DISCOVERY_FLAG_NO_STREAMS{ view_label: "Units" label: "DISCOVERY_FLAG_NO_STREAMS" type: sum sql: ${TABLE}.DISCOVERY_FLAG_NO_STREAMS ;; } measure: DISCOVERY_FLAG_NULL_STREAMS{ view_label: "Units" label: "DISCOVERY_FLAG_NULL_STREAMS" type: sum sql: ${TABLE}.DISCOVERY_FLAG_NULL_STREAMS ;; } measure: TOTAL_LISTEN_DURATION{ view_label: "Units" label: "TOTAL_LISTEN_DURATION" type: number sql: ${TABLE}.TOTAL_LISTEN_DURATION ;; } measure: units{ view_label: "Units" label: "Units" type: sum sql: ${TABLE}.streams ;; } measure: AVG_LISTEN_DURATION{ view_label: "Units" label: "AVG_LISTEN_DURATION" type: average sql: ${TABLE}.AVG_LISTEN_DURATION ;; } dimension: SOURCETYPEGROUP { view_label: "User" label: "SOURCETYPEGROUP" type: string sql: ${TABLE}.SOURCETYPEGROUP ;; } dimension: CATALOG_TYPE { view_label: "User" label: "CATALOG_TYPE" type: string sql: ${TABLE}.CATALOG_TYPE ;; } dimension: SOURCES_STREAM_TYPE { view_label: "User" label: "SOURCES_STREAM_TYPE" type: string sql: ${TABLE}.SOURCES_STREAM_TYPE ;; } dimension: DEVICE_TYPE { view_label: "User" label: "Device Type" type: string sql: ${TABLE}.DEVICE_TYPE ;; } }