"""Config for AWA Ingestion Workflow.""" import os environment = os.environ.get('Environment', 'dev') feed_name = 'awa' secrets_path = 'awa' feedid = 44 storeid = 1600 # bucket for dropped data sme_theorchard_drop_bucket_bucket = os.environ.get( 'FEED_INGESTION_DROP_BUCKET', 'dev-feed-drop') if environment == 'production': sme_theorchard_drop_bucket_bucket = 'prod-orcdbucket' # bucket for archived data data_bucket = os.environ.get( 'FEED_INGESTION_DATA_BUCKET', 'dev-cucumbers') if environment == 'production': data_bucket = 'cucumbers' licensors = { 'theorchard': dict( source_bucket_name=sme_theorchard_drop_bucket_bucket, source_file_name='{date:%Y%m%d}_play_summary_397.tsv', s3_drop_path='feed-drop/AWA/', s3_archive_path='AWA/archives/{date:%Y-%m-%d}/', reports={ 'play_summary': dict( target_filename='{date}_play_summary_397.tsv', staging_raw_table='staging_raw_awa', temp_staging_fact_table='temp_awa_staging_fact_play_summary' '_{date:%Y_%m_%d}', s3_path='AWA/archives/{date}/', ), } ), 'smej': dict( source_bucket_name=sme_theorchard_drop_bucket_bucket, source_file_name='PKZ0_D_{date:%Y%m%d}_{date:%Y%m%d}.txt', s3_drop_path='feed-drop/AWA/sme/', s3_archive_path='AWA/smej/archives/{date:%Y-%m-%d}/', reports={ 'standard_sales': dict( target_filename='standard_sales.tsv', s3_path='AWA/smej/archives/{date}/clean/', staging_raw_table='staging_raw_awa_standard_sales', record_type='N', ), 'marketshare': dict( target_filename='marketshare.tsv', s3_path='AWA/smej/archives/{date}/clean/', staging_raw_table='staging_raw_awa_marketshare', record_type='M', ), } ), } snowflake_error_limit = 100