The COPY command with default parameters is atomic. If the file contains an invalid line that could cause the download to fail, the COPY transaction will be canceled and the data will not be imported.
If you want to skip invalid rows and not stop the transaction, you can use the MAXERROR option for the COPY command, which ignores invalid rows. Here is an example that ignores up to 100 invalid lines.
COPY table_name from 's3://[bucket-name]/[file-path or prefix]' CREDENTIALS 'aws_access_key_id=xxxx;aws_secret_access_key=xxxx' DELIMITER '\t' MAXERROR 100;
If the number of invalid rows is greater than the number of MAXERROR errors (100), the transaction will be canceled.
For more information on the COPY command, see the following link. http://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html
source share