"""Cable Ingestion ETL Configuration.""" from os import environ SFTP_RENTRAK_CREDENTIALS = { 'host': environ.get('FTP_RENTRAK_HOST'), 'password': environ.get('FTP_RENTRAK_PASS'), 'username': environ.get('FTP_RENTRAK_USER')} SNS_ACTION_FAILURE = 'etl-failure' SNS_ACTION_SUCCESS = 'etl-success' SNS_TOPIC_ARN = environ.get('SNS_TOPIC_ARN') SNS_REGION_NAME = 'us-east-1' SNS_SOURCE = 'cable_ingestion' SQS_BUILD_CACHE_ACTION = 'build-cache' SQS_BUILD_CACHE_REGION_NAME = 'us-east-1' SQS_BUILD_CACHE_SOURCE = 'etl:cable_ingestion' SQS_BUILD_CACHE_URL = environ.get('SQS_BUILD_CACHE_URL') SWF_WORKFLOW_NAME = 'ows_ft_etl_cable_ingestion' SWF_WORKFLOW_TIMEOUT = 3600 SWF_WORKFLOW_VERSION = '0.1' RAW_ARCHIVE_DESTINATION = \ 's3://{bucket}/film-transparency/cable/{correlation_id}/' # The following are csv column and type mappings for csv data conversion. These # are ordinal positions based on mysql's internal engine (minus 1 because of # mysql's 1-based index). The format is (set(columns), casting callable). RAW_CSV_COLUMN_TYPES = ( ({26, 32, 34, 35, 36, 37}, float), ({3, 5, 7, 9, 11, 13, 17, 20, 23, 24, 31, 33, 38, 39, 40}, int)) # @todo to put it in env as 0 or 1 if we can set env from jenkins job. BACKFILL_RUN = False