"""Config for YouTube Asset Conflict Ingestion Workflow.""" import os environment = os.environ.get('Environment', 'dev') feed_name = 'youtube_asset_conflict' secrets_path = 'youtube_asset_conflict' s3_feed_name = 'YouTubeAssetConflict' youtube_report_full_name = 'content_owner_asset_conflict_a3' expected_bucket_owner = os.environ.get('EXPECTED_BUCKET_OWNER', '437795906767') source_file_pattern = fr'^{youtube_report_full_name}\.\w+\.csv\.gz$' source_filename_template = f'{youtube_report_full_name}.{{account}}.csv.gz' accounts = { 'ORCHARD': { 'file_label': 'ORCH' } } s3_drop_bucket = os.environ.get('FEED_INGESTION_DROP_BUCKET', 'dev-feed-drop') s3_archive_bucket = os.environ.get( 'FEED_INGESTION_DATA_BUCKET', 'dev-cucumbers') s3_dir_path = f'{s3_feed_name}/archives/{{datestamp}}/' s3_archive_prefix = 's3://{s3_bucket}/{s3_feed_name}/' s3 = { 'archive': s3_archive_prefix + 'archives/{datestamp}/', 'staging_raw_temp': ( s3_archive_prefix + 'staging_raw_temp/{datestamp}/' ), 'fact_conflict': s3_archive_prefix + 'fact_conflict/{datestamp}/' } snowflake_table_names = { 'staging_raw': 'staging_raw_youtube_asset_conflict', 'staging_raw_temp': 'staging_raw_youtube_asset_conflict_{account}_{datestamp}', 'fact_conflict': 'fact_conflict', 'territories_temp': 'youtube_asset_conflict_territory_code_temp', 'youtube_asset_conflict_by_territory_temp': 'youtube_asset_conflict_by_territory_{datestamp}', 'fact_conflict_temp': 'temp_fact_conflict_{datestamp}', 'staging_raw_youtube_asset_report': 'staging_raw_youtube_asset_report', 'registry': 'registry', 'track': 'track', 'releases': 'releases', 'artist_info': 'artist_info' } art_relations_db = 'orchard_app_reporting_v2' art_relations_schema = 'art_relations_prod_art_relations' asset_report_schema = os.environ.get( 'YT_ASSET_CONFLICT_ASSET_REPORT_SCHEMA', 'prod') registry_schema = os.environ.get('YT_ASSET_CONFLICT_REGISTRY_SCHEMA', 'prod') territory_standard = 'ISO_3166_1_2016' sound_recording_asset_type = 'SOUND_RECORDING' time_zone = 'America/New_York' # threshold for exiting the SWF if there is not enough data, inclusive fact_conflict_temp_size_exception_threshold = os.environ.get( 'FACT_CONFLICT_TEMP_SIZE_EXCEPTION_THRESHOLD', 0) unresolved_conflicts_exception_threshold = os.environ.get( 'UNRESOLVED_CONFLICTS_EXCEPTION_THRESHOLD', 0) replace_archive_files = True youtube_reporting_api_service_name = 'youtubereporting' youtube_reporting_api_version = 'v1' jobs_meta_path = os.path.join( os.path.dirname(__file__), 'jobs_no_playlists.json') credentials_path = '/'.join( os.path.dirname(__file__).split('/')[:-2] + ['conf', 'youtube_access_token.json']) # Content owner IDs generated by YouTube. orch = 'J8vAyKuNSYBIN_9RIdxggQ' cms_dict = { orch: 'ORCH' }