version: 2

sources:
  - name: youtube
    database: prod
    schema: yt_reports_api
    tables:
    # please retain alphabetical order for source table names

      - name: annotations_intermediate
        description: youtube video report for annotation usage
        data_tests:
          - not_transient

      - name: assetannotations_intermediate
        description: youtube asset report for annotations
        data_tests:
          - not_transient

      - name: assetbasic_intermediate
        description: youtube report asset_intermediate
        data_tests:
          - not_transient:
              config:
                severity: warn
          - clustered:
              config:
                severity: warn
              arguments:
                by: channel_id, video_id, asset_id

      - name: assetcards_intermediate
        description: youtube asset report for cards
        data_tests:
          - not_transient

      - name: assetcombined_intermediate
        description: youtube report asset_combined
        data_tests:
          - not_transient

      - name: assetdemographics_intermediate
        description: youtube asset report for user demographics
        data_tests:
          - not_transient

      - name: assetdeviceos_intermediate
        description: youtube asset report for device type and operating system
        data_tests:
          - not_transient

      - name: assetplaybacklocation_intermediate
        description: youtube asset report for playback location
        data_tests:
          - not_transient

      - name: assetprovince_intermediate
        description: youtube asset report for user activity with state/province level granularity
        data_tests:
          - not_transient

      - name: assetsharingservice_intermediate
        description: youtube asset report for sharing services
        data_tests:
          - not_transient

      - name: assettrafficsource_intermediate
        description: youtube asset report for traffic source
        data_tests:
          - not_transient

      - name: cards_intermediate
        description: youtube video report for cards engagement
        data_tests:
          - not_transient

      - name: combined_intermediate
        description: youtube video report for combined dimensions (playback location, traffic source, etc.)
        data_tests:
          - not_transient

      - name: demographics_intermediate
        description: youtube video report for user demographics
        data_tests:
          - not_transient

      - name: deviceos_intermediate
        description: youtube video report for device type and operating systems
        data_tests:
          - not_transient

      - name: playbacklocation_intermediate
        description: youtube video report for playback location
        data_tests:
          - not_transient

      - name: playlistcombined_intermediate
        description: youtube playlist report for videos
        data_tests:
          - not_transient

      - name: revenue_intermediate
        description: Estimated video revenue report from the content owner reports available in YouTube's bulk reporting api.
        data_tests:
          - not_transient

      - name: sharingservice_intermediate
        description: youtube video report for sharing services
        data_tests:
          - not_transient

      - name: subtitles_intermediate
        description: youtube video report for subtitle usage
        data_tests:
          - not_transient

      - name: trafficsource_intermediate
        description: youtube video report for traffic source
        data_tests:
          - not_transient

      - name: useractivity_intermediate
        description: youtube video report for user activity
        data_tests:
          - not_transient

  - name: prod
    database: facts
    schema: prod
    tables:
    # please retain alphabetical order for source table names
      - name: mappings_track_to_videos
        description: >
          Many-to-many mapping between track ISRCs and YouTube video IDs.

      - name: youtube_video_asset_type_mapping
        description: >
          Lookup table resolving each YouTube video ID to its asset type
          (MUSIC_VIDEO or ART_TRACK_VIDEO).