Review the configs in config.d to make sure "addquotes" is set to False and that "escape" is missing (thereby defaulting to false):
Compare the configs in config.d with the test configs in the ticket, making sure that the only change being that 'doug_test/GDXDSD-5611/' is put at the start of the "directory" option
Log into the ec2 instance through the following commands
awsmfa prod <AWS OTP>
microservice_ssm
cd /home/microservice/branch/GDXDSD-5611-add-quotes-around-text-option-to-redshift-to-s3/redshift_to_s3
Run the following commands and compare its output to what's expected:
pipenv run python redshift_to_s3.py -c config.d/GDXDSD-5611-default.json && pipenv run python redshift_to_s3.py -c config.d/GDXDSD-5611-yes-addquotes-no-escape.json && pipenv run python redshift_to_s3.py -c config.d/GDXDSD-5611-no-addquotes-yes-escape.json && pipenv run python redshift_to_s3.py -c config.d/GDXDSD-5611-yes-addquotes-yes-escape.json && pipenv run python redshift_to_s3.py -c config.d/GDXDSD-5611-no-addquotes-no-escape.json
This PR does the following:
Testing notes:
There will three sections to the testing
These tests will use modified configs that do not appear in the PR. You can view these modified test configs in the ticket
Testing instructions:
Report: redshift_to_s3.py
Config: config.d/GDXDSD-5611-default.json
DML: GDXDSD-5611.sql
Microservice started at: 2023-07-31 16:30:29-0700 (PDT), ended at: 2023-07-31 16:30:30-0700 (PDT), elapsing: 0:00:01.331193.
Objects loaded to S3 /batch: 1/1 Objects successfully loaded to S3 /batch: 1
List of objects successfully loaded to S3 /batch
Objects to store: 1 Objects stored to s3 /client: 1
List of objects stored to S3 /client: 1: client/doug_test/GDXDSD-5611/default/GDXDSD-5611_default_20230731T233029_part000.csv
Objects to process: 1 Objects processed to s3 /good: 1
List of objects processed to S3 /good: 1: processed/good/client/doug_test/GDXDSD-5611/default/GDXDSD-5611_default_20230731T233029_part000
pipenv run python redshift_to_s3.py -c config.d/sdpr_last_full_day-test.json pipenv run python redshift_to_s3.py -c config.d/sdpr_last_full_day_incremental-test.json pipenv run python redshift_to_s3.py -c config.d/sdpr_hourly-test.json pipenv run python redshift_to_s3.py -c config.d/sbc-sdpr_last_full_day_incremental-test.json pipenv run python redshift_to_s3.py -c config.d/pmrp_qdata_dates-test.json pipenv run python redshift_to_s3.py -c config.d/pmrp_qdata_daily-test.json pipenv run python redshift_to_s3.py -c config.d/pmrp_all-test.json pipenv run python redshift_to_s3.py -c config.d/pmrp_qdata_range-test.json pipenv run python redshift_to_s3.py -c config.d/sbc-sdpr_historical-test.json pipenv run python redshift_to_s3.py -c config.d/sdpr_historical-test.json pipenv run python redshift_to_s3.py -c config.d/pmrp_date_range-test.json pipenv run python redshift_to_s3.py -c config.d/pmrp_max_date-test.json