version: 2
# deduplicated list of all source and seeded tables used in this project
sources:
  #snowflake tables
  - name: prod
    database: facts
    schema: prod
    tables:
      - name: tiktok_trend_score_by_isrc_dbt
        description: 
          A table containing TikTok trend scores for each ISRC.
        columns:
          - name: isrc
            description: The ISRC
          - name: country_code
            description: The country code.
          - name: tiktok_trend_score
            description: A score reflecting the popularity of the recording on TikTok.

      - name: metrics_by_track_country_feed_distributor_rollup
        description: 
          A table containing metrics for each track, country, feed, and distributor rollup.
        columns:
          - name: track_id
            description: The unique ID of the track.
            tests:
              - not_null
          - name: feed_id
            description: The unique ID of the feed.
          - name: country_code
            description: The country code of the country.
          - name: distributor
            description: The name of the music distributor.
          - name: store_id
            description: The unique ID of the DSP.
          - name: artist_id
            description: The unique ID of the artist.
          - name: artist_name
            description: The name of the artist.
          - name: label_id
            description: The unique ID of the label.
          - name: label_name
            description: The name of the label.
          - name: label_country
            description: The country code of the label.
          - name: subaccount_id
            description: The unique ID of the subaccount.
          - name: subaccount_name
            description: The name of the subaccount.
          - name: release_date
            description: The date when the track was released.
          - name: sale_start_date
            description: The date when the track was available for sale.
          - name: product_id
            description: The unique ID of the product.
          - name: deletions_for_isrc
            description: The number of deletions for the ISRC.
          - name: isrc
            description: The ISRC for the track.
          - name: track_name
            description: The name of the track.
          - name: genre_id
            description: The unique ID of the genre.
          - name: genre_name
            description: The name of the genre.
          - name: streams_1_day
            description: The number of streams in the latest available day.
          - name: streams_1_day_prev
            description: The number of streams in previous available day.
          - name: streams_7_days
            description: The number of streams for the track in the last 7 days.
          - name: streams_7_days_prev
            description: The number of streams for the track in the previous 7 days.
          - name: streams_28_days
            description: The number of streams for the track in the last 28 days.
          - name: streams_28_days_prev
            description: The number of streams for the track in the previous 28 days.
          - name: streams_183_days
            description: The number of streams for the track in the last 183 days.
          - name: streams_183_days_prev
            description: The number of streams for the track in the previous 183 days.
          - name: streams_365_days
            description: The number of streams for the track in the last 365 days.
          - name: streams_365_days_prev
            description: The number of streams for the track in the previous 365 days.
          - name: streams_all_time
            description: The total number of streams
          - name: tiktok_creations_1_day
            description: The number of TikTok video creations in the latest available day.
          - name: tiktok_creations_1_day_prev
            description: The number of TikTok video creations in the previous available day.
          - name: tiktok_creations_7_days
            description: The number of TikTok video creations for the track in the last 7 days.
          - name: tiktok_creations_7_days_prev
            description: The number of TikTok video creations for the track in the previous 7 days.
          - name: tiktok_creations_28_days
            description: The number of TikTok video creations for the track in the last 28 days.
          - name: tiktok_creations_28_days_prev
            description: The number of TikTok video creations for the track in the previous 28 days.
          - name: tiktok_creations_183_days
            description: The number of TikTok video creations for the track in the last 183 days.
          - name: tiktok_creations_183_days_prev
            description: The number of TikTok video creations for the track in the previous 183 days.
          - name: tiktok_creations_365_days
            description: The number of TikTok video creations for the track in the last 365 days.
          - name: tiktok_creations_365_days_prev
            description: The number of TikTok video creations for the track in the previous 365 days.
          - name: tiktok_creations_all_time
            description: The total number of TikTok video creations for the track since its release.
