version: 2

models:
  - name: youtube_summary_streams_daily
    description: Contains daily track level analytics streaming information from YouTube. has data since 12/25/2024
    data_tests:
      - has_data
      - transient
    columns:
      - name: activity_date
        description: Date of transaction
        data_tests:
          - consecutive:
              config:
                severity: warn
              arguments:
                period: 1
                filter: activity_date >= current_date()-25
      - name: label_id
        description: Label ID linked to the main asset
      - name: label_name
        description: Name of the label linked to the main asset
      - name: label_country
        description: Country of the label linked to the main asset
      - name: service_tier_name
        description: Label tier of the label linked to the main asset
      - name: brand_name
        description: Brand of the label linked to the main asset (orchard/ awal etc)
      - name: parent_company
        description: Parent Company linked to the main asset (will always be theorchard)
      - name: primary_relationship_manager
        description: Label Manager of the label associated with the primary asset
      - name: subaccount_id
        description: Subaccount associated with the primary asset
      - name: subaccount_name
        description: Subaccount associated with the primary asset
      - name: upc
        description: UPC associated with the primary asset
      - name: release_name
        description: Name of the release associated with the primary asset
      - name: release_date
        description: date of the release associated with the primary asset
      - name: sale_start_date
        description: Date since which The Orchard began distributing the release associated with the primary asset
      - name: genre
        description: Genre of the release associated with the primary asset (As fed in OA)
      - name: imprint
        description: Imprint of the release associated with the primary asset (As fed in OA)
      - name: isrc
        description: ISRC of the primary asset
      - name: asset_isrc
        description: List of all ISRCs owned by the music label for the video. Equal to isrc if there is only one asset linked to the video
      - name: track_name
        description: Name of the track linked to of the primary asset
      - name: transaction_country_code
        description: ISO Code for country of consumption
      - name: transaction_country_name
        description: Name of country of consumption
      - name: transaction_region
        description: State/ area of consumption
      - name: artist
        description: Artist Name of the artists associated to the primary asset
      - name: video_id
        description: Unique identifier for the video
      - name: business_model
        description: The YouTube business model (e.g., ad-supported vs. subscription-supported vs. rental) applicable to the activity.
      - name: platform
        description: Device on which the transaction occured
      - name: content_type
        description: The content type that reflects the music-related source of the video
      - name: traffic_source_type
        description: Describes the manner in which users reached the video
      - name: traffic_source_detail
        description: Detailed information about the traffic source.  Can contain video ids
      - name: user_request
        description: Voice command that generated the session. Only present where the command occurred at least 100 times
      - name: playback_location_type
        description: Provides insight about the page or application where user activity occurred. (Similar to source of stream)
      - name: playback_location_detail
        description: Shows additional detail about where the video was played.
      - name: subscription_type
        description: Subscription of the user
      - name: is_label_owned_channel
        description: Yes if the channel is a core channel directly owned by a label, an OAC-related channel, or a channel otherwise associated with an Official Artist Channels.
      - name: is_multi_claim_video
        description: Yes if the video contains more than one active claim.
      - name: is_music
        description: Yes if playback is on a music interface
      - name: is_audio_play
        description: Yes if playback was backgrounded on YouTube Music App, or if the video was an Art Track.
      - name: is_audio_tier_mode
        description: Yes if the playback is for Audio Tier mode.
      - name: is_livestream
        description: Yes if the video was played as a livestream. Note that the same video can be played as a non-livestream after the streaming ends.
      - name: is_shorts_eligible
        description: Yes if the video is eligible for playback in the Shorts watch experience.
      - name: is_shorts_playback_experience
        description: Yes if the viewer watched the video in the Shorts watch experience.
      - name: plays
        description: Total streams
      - name: watch_time_sec
        description: Total watch time in seconds
      - name: net_likes
        description: Total likes on a video (-1 if a like was removed)
      - name: net_dislikes
        description: Total dislikes on a video (-1 if a dislike was removed)
      - name: video_comments
        description: Total comments on a video
      - name: video_shares
        description: Total shares on a video
      - name: users_subscribed_to_uploader
        description: Number of viewers subscribed to the channel at the time of watching the video
      - name: users_not_subscribed_to_uploader
        description: Number of viewers not  subscribed to the channel at the time of watching the video
      - name: no_of_users
        description: Number of viewers on a video
