Menu
Amazon Redshift
Database Developer Guide (API Version 2012-12-01)

Step 7: Run the COPY Command to Load the Data

Run a COPY command to connect to the host and load the data into an Amazon Redshift table. In the COPY command, specify the explicit Amazon S3 object path for the manifest file and include the SSH option. For example,

Copy
copy sales from 's3://mybucket/ssh_manifest' credentials iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole' delimiter '|' ssh;

Note

If you use automatic compression, the COPY command performs two data reads, which means it will execute the remote command twice. The first read is to provide a sample for compression analysis, then the second read actually loads the data. If executing the remote command twice might cause a problem because of potential side effects, you should disable automatic compression. To disable automatic compression, run the COPY command with the COMPUPDATE option set to OFF. For more information, see Loading Tables with Automatic Compression.