version: 2
# deduplicated list of all source and seeded tables used in this project
sources:
  #snowflake tables
  - name: prod
    database: facts
    schema: prod
    tables:
      # base tables
      - name: demographics_region_mapping_v2
      - name: mkt_priority_all
      - name: youtube_streams_by_track_country_feed_distributor_daily_recent
      - name: youtube_streams_by_track_country_feed_distributor_daily_history
      - name: mkt_priority_all_log
      - name: profile_has_access_to_vendor
      - name: has_profile
      - name: fact_analytics
      - name: fact_socials_latest
      - name: company_brand
      - name: dim_label
      - name: dim_artist
      - name: dim_country
      - name: dim_claim
      - name: dim_genre
      - name: dim_subgenre
      - name: dms_customer
      - name: dim_release
      - name: dim_release_history
      - name: dim_brand
      - name: dim_parent_company
      - name: dim_service_tier
      - name: dim_track
      - name: dim_track_clean_mv
      - name: dim_transactiontype
      - name: dim_store
      - name: dim_currency
      - name: fact_sales
      - name: fact_market_share
      - name: dim_day
      - name: dim_period
      - name: dim_isrc
      - name: dim_licensor
      - name: dim_playlist
      - name: registry
      - name: dim_subaccount
      - name: global_participant
      - name: global_participant_represents_label_participant
      - name: label_participant_participated_in_orchard_track
      - name: staging_raw_amazon_unlimited_awal
      - name: staging_raw_amazon_prime_awal
      - name: staging_raw_amazon_adsupported_awal
      - name: staging_raw_amazon_v2
      - name: v_streams_by_product_track_country_feed_distributor_daily
      - name: staging_raw_youtube_video_report
      - name: staging_raw_tiktok_trends_topsong
      - name: service_tier
      - name: spotify_tracks
      - name: spotify_audio_features
      - name: publishing_has_composition
      - name: publishing_has_label_sound_recording
      - name: publishing_has_sound_recording
      - name: playlists_by_playlist
      - name: global_sound_recording
      - name: label_sound_recording
      - name: publishing_composition_agreement
      - name: publishing_agreement
      - name: publishing_publisher_agreement
      - name: publishing_songwriter_agreement
      - name: publishing_song_writer
      - name: publishing_publisher
      - name: publishing_composition
      - name: staging_raw_megaphone
      - name: registry_audit
      - name: sme_labelcopy_ingest
      - name: itunes_tickets
      - name: cdc_musicgraph_hasagreement
      - name: cdc_musicgraph_publishingcomposition
      - name: cdc_musicgraph_publishingagreement
      - name: cdc_musicgraph_publishingsongwriter
      - name: cdc_musicgraph_globalsoundrecording
      - name: cdc_musicgraph_labelsoundrecording
      - name: cdc_musicgraph_hassoundrecording
      - name: cdc_musicgraph_publishingpublisher
      - name: spotify_chart
      - name: staging_raw_luminate_daily_artist
      - name: staging_raw_luminate_weekly_artist
      - name: staging_raw_luminate_daily_song
      - name: staging_raw_luminate_weekly_song
      - name: staging_raw_luminate_daily_isrc
      - name: staging_raw_luminate_weekly_isrc
      - name: staging_playlists_by_playlist_spotify_public_dbt
      - name: dim_containertype
      - name: dim_sourcetype
      - name: dim_subscriptionpaytier
      - name: dim_subscriptiontype
      - name: dim_user
      - name: dim_device
      - name: staging_raw_apple_music_totallibraryadds
      - name: staging_raw_apple_music_demographics
      - name: staging_raw_snapchat_views
      - name: staging_raw_snapchat_creations
      - name: dim_editorial_playlist_top_non_editorial_playlist
      - name: fact_youtube_asset_analytics
      - name: altafonte_apple_id_mapping_derived
      - name: vw_workstation_summary
      - name: aggregated_skips_and_saves
      - name: playlists_placements_by_isrc_playlist_private
      - name: playlists_placements_by_isrc_playlist_public
      - name: v_playlists_placements_by_isrc_playlist_public
      - name: staging_raw_netease
      - name: staging_raw_qq
      - name: staging_raw_kuwo
      - name: staging_raw_kugou
      - name: workstation_fact_sales_unified_dbt



      - name: staging_raw_youtube_claim
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        config:
          freshness:
            warn_after: {count: 1, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_youtube_asset_report
        tests:
          - not_transient

        config:
          freshness:
            warn_after: {count: 1, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_spotify_v2
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_amazon_unlimited
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_amazon_adsupported
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_amazon_prime
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_uma
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_pandora
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_soundcloud_trackinformation
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_soundcloud_streamlevelreport
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_soundcloud_playlistreporting
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_soundcloud_customerdata
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_tiktok
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 3, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_tiktok_statistics
        tests:
          - not_transient

      - name: staging_raw_apple_music_container
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_deezer_v3_combined_theorchard
        tests:
          - clustered:
              config:
                  #Unsure as to whether any changes will happen when this is updated and do not want the model to fail.
                severity: warn
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_deezer_v1
        tests:
          - not_transient
          - clustered:
              config:
                #Unsure as to whether any changes will happen when this is updated and do not want the model to fail.
                severity: warn
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_awa

        tests:
          - not_transient
          - clustered:
              config:
                enabled: false
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  config:
                    severity: warn
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_awa_trends
        columns:
          - name: download_date
            tests:
              - consecutive:
                  config:
                    severity: warn
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_itunes

      - name: apple_music_container_subtype_mapping
        tests:
          - not_transient
      - name: awal_apple_id_mapping
      - name: apple_id_mapping
        tests:
          - not_transient
      - name: sony_apple_id_mapping
        tests:
          - not_transient:
              config:
                severity: warn
      - name: profile
        tests:
          - not_transient
      - name: profile_has_access_to_label_participant
        tests:
          - not_transient
      - name: label_participant
        tests:
          - not_transient
      - name: identity
        tests:
          - not_transient
      - name: staging_raw_apple_music_streams
        # historical report. Not populated anymore
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
      - name: staging_raw_apple_music_summary_streams
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
          - name: isrc
            tests:
              - not_null:
                  config:
                    warn_if: '>1000'
                    error_if: '>5000'
                    where: download_date >= current_date()-10
              - is_isrc:
                  config:
                    warn_if: '>5000'
                    error_if: '>10000'
                    where: download_date >= current_date()-10

        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 5, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_apple_music_nonroyalty_summary_streams
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 5, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_apple_music_nonroyalty_streams
        # historical report. Not populated anymore
        tests:
          - not_transient
          - clustered:
              arguments:
                by: download_date
      - name: staging_raw_sme_latam_weekly_unified_chart
        description: |
          Report BMAT - Sony - Sony Latam Unified Weekly Chart
          Backfilled once per week
        tests:
          - not_transient
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 7
                    filter: download_date >= current_date() - 7*11
      - name: staging_raw_ritmogestion
        description: |
          Report "Top 10000 Streams" from ritmogestion.es.
          Backfilled once in week.
          More information: https://github.com/theorchard/swf-feed-ingestion/tree/master/feed_ingestion/flows/ritmogestion
        tests:
          - not_transient
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 7
                    filter: download_date >= current_date() - 7*10
        config:
          freshness:
            warn_after: {count: 14, period: day}
            error_after: {count: 21, period: day}
            filter: download_date >= current_date() - 4*7
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: map_transactiontype
        tests:
          - not_transient:
              config:
                enabled: false
      - name: staging_raw_spotify_market_share_week_ending
        tests:
          - not_transient:
              config:
                enabled: false
      - name: staging_raw_line_place
        tests:
          - not_transient
          - clustered:
              config:
                enabled: false
              arguments:
                by: download_date
      - name: staging_raw_wynk
        tests:
          - not_transient
          - clustered:
              config:
                enabled: false
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_music_analytics_in_review
        tests:
          - not_transient:
              config:
                severity: warn
          - clustered:
              config:
                enabled: false
              arguments:
                by: download_date
        columns:
          - name: download_date
            tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 5, period: day}
            error_after: {count: 6, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_music_analytics_excluded_streams
        description: 'Monthly report containing number of streams excluded sent by Apple once a month'
        tests:
          - not_transient:
              config:
                severity: warn
          - clustered:
              config:
                enabled: false
              arguments:
                by: download_date
        config:
          freshness:
            warn_after: {count: 31, period: day}
            error_after: {count: 32, period: day}
            filter: download_date >= current_date()-15
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_spotify_artificial_streams
        description: 'Report containing streams marked as fraudulent by Spotify (Streams marked as FS in fact_sales)'
        tests:
          - not_transient
          - clustered:
              config:
                enabled: false
              arguments:
                by: download_date
        config:
          freshness:
            warn_after: {count: 31, period: day}
            error_after: {count: 32, period: day}
            filter: download_date >= current_date()-15
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_tiktok_fraudulent_usage_report
        tests:
          - not_transient
          - clustered:
              config:
                enabled: false
              arguments:
                by: download_date
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: apple_music_shazam_daily_events
      - name: youtube_analytics_summary_streams_daily
        config:
          freshness:
            warn_after: {count: 3, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-25
          loaded_at_field: TO_TIMESTAMP(download_date)
      - name: staging_raw_insta_reels_views
      - name: staging_raw_insta_reels_creations
      - name: CDC__MUSIC_GRAPH_V5__LABEL_SOUND_RECORDING__SCHEMA_V4__VIEW
      - name: CDC__MUSIC_GRAPH_V5__PUBLISHING_COMPOSITION__SCHEMA_V4__VIEW
      - name: CDC__MUSIC_GRAPH_V5__PUBLISHING_PUBLISHER__SCHEMA_V4__VIEW
      - name: CDC__MUSIC_GRAPH_V5__PUBLISHING_SONG_WRITER__SCHEMA_V4__VIEW
      - name: CDC__MUSIC_GRAPH_V5__PUBLISHING_AGREEMENT__SCHEMA_V4__VIEW

  - name: intelligence
    database: intelligence
    schema: prod
    tables:
      # base tables
      - name: apple_544
      - name: genre_mapping_apple_pitch_grid
      - name: playlistname_exclusions
      - name: transaction_type_group
      - name: restrictions_release_store
      - name: metadata_simplified
      - name: vw_country_region_flatten
      - name: knr_label_exclusions
      - name: looker_1091_shared_access_labels
      - name: youtube_claim_report
      - name: territory_grouping_v2
      - name: dim_publishing_income_type

  - name: intelligence_dev
    database: intelligence
    schema: dev_zallard
    tables:
      # base tables
      - name: agg_debut_forecasts
      - name: custom_label_mapping
      - name: us_latin_labels

  - name: intelligence_strategy
    database: intelligence
    schema: dbt_prod_strategy
    tables:
      - name: airtable_label_metadata
      - name: rm_db_publishing_royalties_base

  - name: dev_engineering
    database: dev_engineering
    schema: eimpara
    tables:
      - name: maze_pred_new_weekly_releases_v2
      - name: maze_predictions_using_smote

  - name: intelligence_seed_data
    database: intelligence
    schema: seed_data
    tables:
      # base tables
      - name: awal_b2b_accounts

  - name: intelligence_dev_main
    database: intelligence
    schema: dev
    tables:
      # base tables
      - name: dummy_table

  - name: orchard_app_reporting_prod_ows_track_ows_track
    database: orchard_app_reporting_v2
    schema: prod_ows_track_ows_track
    tables:
      - name: performer_role
      - name: performer
      - name: track_sample

  - name: orchard_app_reporting_prod_ows_collaborator_ows_collaborator
    database: orchard_app_reporting_v2
    schema: prod_ows_collaborator_ows_collaborator
    tables:
      - name: report

  - name: orchard_app_reporting_prod_ows02_ows_timed_release_schedule
    database: orchard_app_reporting_v2
    schema: prod_ows_timed_release_ows_timed_release_schedule
    tables:
      - name: timed_release
      - name: product_live_time

  # further db connections, used by point_of_sale and mappings
  - name: orchard_app_reporting_art_relations
    database: orchard_app_reporting_v2
    schema: art_relations_prod_art_relations
    tables:
      - name: release_exclusive
      - name: artist_info
      - name: contact
      - name: owner
      - name: country
      - name: vendor
      - name: vend_contact
      - name: vendor_closers
      - name: vendor_contract
      - name: vendor_contract_advance
      - name: vendor_contract_distribution_type
      - name: vendor_contract_change_history
      - name: vendor_dms_master_restriction
      - name: vendor_territory_restriction
      - name: vendor_accounting
      - name: vendor_icon
      - name: track
      - name: track_artist
      - name: track_publisher
      - name: track_writer
      - name: track_producer_nationality
      - name: track_master_rights
      - name: track_video
      - name: releases
      - name: release_approval_queue
      - name: release_artist
      - name: release_subgenre
      - name: release_dms_master_restriction
      - name: release_dms_restriction
      - name: release_mfit_info
      - name: release_territory_restriction
      - name: subaccount
      - name: subaccount_dms_restriction
      - name: subaccount_dms_master_restriction
      - name: subaccount_territory_restriction
      - name: subgenre
      - name: orchadmin_users
      - name: genre
      - name: mkt_priority
      - name: mkt_priority_project
      - name: mkt_program_info
      - name: delivery_history
      - name: release_grid
      - name: track_instant_grat
      - name: customer_master
      - name: customer_master_master
      - name: customer_master_master_distribution_type
      - name: dms_genre_mapping
      - name: dms_master_genre
      - name: dms_master_subgenre
      - name: dms_preferred_artist_country
      - name: dms_preferred_genre
      - name: dms_preferred_label
      - name: dms_preferred_label_country
      - name: dms_preferred_label_priority
      - name: dms_preferred_marketing_priority
      - name: dms_preferred_meta_language
      - name: dms_preferred_sales_start_date
      - name: dms_preferred_subaccount
      - name: dms_preferred_subgenre
      - name: dms_subgenre_mapping
      - name: project
      - name: product_physical
      - name: product_physical_supply_chain_metadata
      - name: product_video
      - name: product_video_approval
      - name: product_type
      - name: distribution_format
      - name: distribution_format_media
      - name: distribution_type
      - name: product_manager_mapping_vendor
      - name: product_manager_mapping_product
      - name: currencies
      - name: language
      - name: image_assets
      - name: release_status
      - name: product_physical_change_history
      - name: product_territory_split
      - name: vendor_checkspaid
      - name: checkspaid
      - name: spotify_equity_checkspaid
      - name: period
      - name: subaccount_royalty_collection_territories
      - name: subaccount_royalty_collection
      - name: booked_vendor_contract_snapshot
      - name: currency_exchange_rates
      - name: vendor_restricted_features
      - name: manual_adjustment
      - name: focus_track
      - name: vendor_dms_master_contract
      - name: login_stat
      - name: vendor_transaction_type_contract
      - name: track_physical
      - name: full_deletions

  - name: orchard_app_reporting_art_relations_log
    database: orchard_app_reporting_v2
    schema: art_relations_prod_art_relations_log
    tables:
      - name: releases_log
      - name: track_instant_grat_log
      - name: mkt_priority_log



  - name: orchard_app_reporting_pricing
    database: orchard_app_reporting_v2
    schema: prod_ows_pricing_pricing
    tables:
      - name: product_store_effective_price_code
      - name: product_orchard_pricing_tier
      - name: orchard_pricing_tier
      - name: store_pricing_tier
      - name: store_pricing_scheme

  - name: orchard_app_reporting_podcast
    database: orchard_app_reporting_v2
    schema: prod_ows_podcast_ows_podcast
    tables:
      - name: podcast


  - name: orchard_app_reporting_sales_goals
    database: orchard_app_reporting_v2
    schema: prod_sales_goals_sales_goals
    tables:
      - name: digital_marketing_projections
      - name: digital_marketing_projections_by_country
      - name: digital_stores
      - name: digital_store_highlights
      - name: digital_store_highlights_log
      - name: marketing_driver
      - name: marketing_driver_log

  - name: orchard_app_reporting_store_availability
    database: orchard_app_reporting_v2
    schema: prod_ows_store_availability_ows_store_availability
    tables:
      - name: product_in_store


  - name: prod_promo_player_promo_player
    database: orchard_app_reporting_v2
    schema: prod_promo_player_promo_player
    tables:
      - name: promo_player

  - name: orchard_app_reporting_direct_delivery
    database: orchard_app_reporting_v2
    schema: reportsdd_direct_delivery
    tables:
      - name: asset
      - name: asset_location
      - name: asset_location_detail
      - name: encoding_queue
      - name: encoding_queue_detail
      - name: storage
      - name: storage_drive
      - name: job_priority

  - name: prod_royalty_accounting_royalty_accounting
    database: orchard_app_reporting_v2
    schema: prod_royalty_accounting_royalty_accounting
    tables:
      - name: accounting_run
      - name: accounting_period
      - name: sales_file
      - name: ledger_adjustment
      - name: ledger_adjustment_adjustment_detail
      - name: ledger_adjustment_detail
      - name: ledger_adjustment_applied
      - name: reference_adjustment_type
      - name: statement_period_adjustment_file
      - name: abacus_event
      - name: contract
      - name: contract_advance
      - name: statement_period
      - name: ledger_account_contract
      - name: account_contract
      - name: account_payment_term
      - name: run_controller_contract
      - name: ledger_account_contract_current_balance
      - name: ledger_accounting_run_balance
      - name: reference_external_source
      - name: contract_lifecycle
      - name: contract_term_condition
      - name: contract_term
      - name: contract_lifecycle_schedule_detail
      - name: contract_lifecycle_schedule
      - name: exchange_rate


  - name: qa_royalty_accounting_royalty_accounting
    database: orchard_app_reporting_v2
    schema: qa_royalty_accounting_royalty_accounting
    tables:
      - name: accounting_run
      - name: accounting_period
      - name: sales_file
      - name: ledger_adjustment
      - name: ledger_adjustment_adjustment_detail
      - name: ledger_adjustment_detail
      - name: ledger_adjustment_applied
      - name: reference_adjustment_type
      - name: statement_period_adjustment_file
      - name: abacus_event
      - name: contract


  - name: sony_internal
    database: sony_internal
    schema: prod
    tables:
      - name: us_physical_retail_view
      - name: cdsus_product
      - name: ca_physical_product_view
      - name: us_physical_product_view

  - name: chartmetric_analytics
    database: chartmetric
    schema: analytics
    tables:
      - name: youtube_audience_stat
      - name: instagram_audience_stat
      - name: tiktok_audience_stat

  - name: chartmetric
    database: chartmetric
    schema: raw_data
    tables:
      - name: apple_music_daily_top_chart
      - name: amazon
      - name: amazon_browse
      - name: amazon_chart
      - name: amazon_playlist
      - name: l_amazon_playlist
      - name: l_amazon_playlist_history
      - name: l_amazon_playlist_stat
      - name: cm_artist
      - name: cm_album
      - name: cm_track
      - name: cm_url
      - name: cm_url_type
      - name: deezer
      - name: deezer_chart
      - name: deezer_playlist
      - name: l_cm_track_cm_artist
      - name: l_cm_track_cm_album
      - name: l_deezer_playlist
      - name: l_deezer_playlist_history
      - name: l_deezer_playlist_stat
      - name: facebook_stat
      - name: spotify
      - name: spotify_playlist
      - name: spotify_chart
      - name: spotify_album
      - name: spotify_artist
      - name: spotify_artist_insights
      - name: spotify_artist_insights_location
      - name: spotify_artist_stat
      - name: l_spotify_artist
      - name: l_spotify_playlist
      - name: l_spotify_playlist_history
      - name: l_spotify_playlist_stat
      - name: shazam
      - name: shazam_chart
      - name: soundcloud
      - name: soundcloud_chart
      - name: twitter_stat
      - name: tiktok
      - name: tiktok_weekly_post_chart
      - name: tiktok_user
      - name: tiktok_user_stat
      - name: instagram_stat
      - name: itunes
      - name: itunes_chart
      - name: itunes_artist
      - name: itunes_playlist
      - name: itunes_playlist_storefront
      - name: l_itunes_playlist
      - name: l_itunes_playlist_history
      - name: l_itunes_playlist_stat
      - name: youtube
      - name: youtube_channel_stat
      - name: youtube_track_chart
      - name: youtube_playlist
      - name: youtube_video_chart
      - name: l_youtube_playlist
      - name: l_youtube_playlist_history
      - name: l_youtube_playlist_stat
      - name: wikipedia_stat
      - name: city


  - name: store_avail
    database: prod_store_avail
    schema: store_avail
    tables:
      - name: availability

  - name: business_systems_salesforce_data
    database: business_systems_salesforce_data
    schema: ca
    tables:
      - name: opportunity

  - name: segment_events_android
    database: segment_events
    schema: mobile_orchard_prod_android
    tables:
      - name: identifies

  - name: segment_events
    database: segment_events
    schema: mobile_orchard_prod
    tables:
      - name: identifies

  - name: sax
    database: awal_sax
    schema: sax
    tables:
      - name: agreements
      - name: account_payments
      - name: rights
      - name: agreement_periods
      - name: exchange_rates
      - name: budgets
      - name: budget_terr_defs
      - name: agr_mech_obligations
      - name: agreement_deal_makers
      - name: sax_users
      - name: manual_agr_adjustments
      - name: exp_version_recordings
      - name: deals
      - name: deal_territories
      - name: territories
      - name: recordings
      - name: recording_artists
      - name: exp_version_owners
      - name: interested_parties
      - name: awal_applications
      - name: recordings_priority_ranks
      - name: exp_versions
      - name: exploitations
      - name: currencies
      - name: agreement_outgoing_types
      - name: budget_commitments
      - name: budget_terr_def_costs
      - name: budget_cost_categories
      - name: right_dates
      - name: royalty_payments
      - name: royalty_adj_payments
      - name: royalties_original_data
      - name: batches
      - name: right_types
      - name: reconciliations
      - name: royalties
      - name: right_nr_schedules
      - name: nr_schedules



  - name: rdl_datasets
    database: awal_sax
    schema: rdl_datasets
    tables:
      - name: royalty_payment_detail



  - name: fpa
    database: awal_sax
    schema: fpa
    tables:
      - name: segmentation_lookup

  - name: royalty_accounting
    database: royalty_accounting
    schema: prod
    tables:
      - name: contract_transaction_staging
      - name: accounting_run_results_distro
      - name: currency_map
      - name: vw_abacus_fact_sales_publishing
      - name: vw_abacus_balances_staging
      - name: vw_dim_abacus_contract
      - name: vw_dim_abacus_account

      - name: vw_abacus_fact_sales_distro_staging

      - name: workstation_fact_sales_unified_dbt
      - name: vw_workstation_summary_unified
      - name: vw_abacus_manual_adjustment
      - name: VW_ABACUS_VENDOR_ACCOUNTING
      - name: VW_ABACUS_ADJUSTMENTS_v2
      - name: abacus_fact_sales_unified_dbt


  - name: royalty_accounting_reporting
    database: royalty_accounting_reporting
    schema: prod
    tables:
      - name: vw_abacus_balances_looker_v2
      - name: vw_dim_abacus_ar_vendor
      - name: vw_dim_abacus_ar_vendor_contract
      - name: vw_dim_abacus_ar_booked_vendor_contract_snapshot
      - name: unprocessed_transactions_staging
      
  - name: prod_prod
    database: prod
    schema: bi
    tables:
      - name: accounting
#
  - name: orchard_app_reporting_art_relations_prod_ddex
    database: orchard_app_reporting_v2
    schema: prod_ddex_ingester_ddex_ingester
    tables:
      - name: upc_remap


  - name: awal_finance
    database: awal
    schema: awal_finance
    tables:
      - name: awal_group_agr_recordings

  - name: prod_content_review_content_review
    database: orchard_app_reporting_v2
    schema: prod_content_review_content_review
    tables:
      - name: review_queue
      - name: approval
      - name: rejection

  - name: airtable_new_advertising
    database: orchard_app_reporting_v2
    schema: airtable___orchard___new_advertising_appuvxstdafah8jzy
    tables:
      - name: requests
      - name: campaigns
      - name: monthly_activity

  - name: fraud_reporting
    database: fraud_reporting
    schema: deezer
    tables:
      - name: staging_raw_deezer_v3_fraud_report
        data_tests:
          - not_transient
          - clustered:
              config:
                severity: warn
              arguments:
                by: download_date
        columns:
          - name: download_date
            data_tests:
              - consecutive:
                  arguments:
                    period: 1
                    filter: download_date >= current_date()-10
        config:
          freshness:
            warn_after: {count: 2, period: day}
            error_after: {count: 4, period: day}
            filter: download_date >= current_date()-10
          loaded_at_field: TO_TIMESTAMP(download_date)
