Shivkumar kondi
Shivkumar kondi

Reputation: 6782

cannot use copy command over zip files in S3toRedshift data loading

I want to copy data from s3 files to redshift database using copy command.

Normally data from a simple excel sheet was easily copied to a database using this simple copy command

I tried to simply load data from one zip file for testing purpose, but it failed

copy media.DFPActivity from 's3://bucketname/myfolder/file_01.gz' 
credentials 'xxxxxxxx'
delimiter '^';
null as '\000';

But I have zip files instead of normal excel files. so can anybody let me know how to extract and copy the data fast into redshift

Upvotes: 0

Views: 778

Answers (1)

Joe Harris
Joe Harris

Reputation: 14035

You need to add GZIP to the COPY command.

http://docs.aws.amazon.com/redshift/latest/dg/t_loading-gzip-compressed-data-files-from-S3.html

Upvotes: 2

Related Questions