"""Config for YouTube Video Report workflow. This report includes but is not limited to the status of the video, ad enablement, number of views, as well as the asset ID and the policy in which the video resides in. Source of this report is CMS and raw files are obtained via ERDL. """ import os feed_name = 'youtube_video' secrets_path = 'youtube_video' feed_version = '1.0' # environment to run in environment = os.environ.get('ENVIRONMENT', 'dev') licensors = ['theorchard', 'sme'] s3_bucket = os.environ.get('FEED_INGESTION_DATA_BUCKET', 'dev-cucumbers') sme_athena_database = os.environ.get('SME_ATHENA_DATABASE') sme_athena_temp_database = os.environ.get('SME_ATHENA_TEMP_DATABASE') athena_workgroup = os.environ.get('ATHENA_WORKGROUP', 'primary') athena_aws_region = os.environ.get('ATHENA_AWS_REGION', 'us-east-1') youtube_report_full_name = 'content_owner_video_metadata_a4' s3 = { 'download_path': 'Youtube_video_report/downloads/', 'archive_path': 'Youtube_video_report/archives/{date:%Y-%m-%d}/{licensor}/', } snowflake = { 'staging_raw': 'staging_raw_youtube_video_report', 'channel_names_table': 'dim_youtube_channel_names', 'temp_staging_raw': 'temp_staging_raw_youtube_video_report_{licensor}_{''date:%Y%m%d}' } source_file_pattern = { 'theorchard': r'^content_owner_video_metadata_a4\.\w+\.csv\.gz$', 'sme': r'^\d{8}_\d{6}_\d{5}_\w+_\w+\-\w+\-\w+\-\w+\-\w+$' } 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_paths = { 'theorchard': '/'.join( os.path.dirname(__file__).split('/')[:-2] + ['conf', 'youtube_access_token.json']) } # Content owner IDs generated by YouTube. orch = 'J8vAyKuNSYBIN_9RIdxggQ' ent = 'oVAQ96fyMa57I6WozL2gUw' cms_dict = { orch: 'ORCH', ent: 'ENT' }