Vinay Emmaadii
Vinay Emmaadii

Reputation: 145

Skip columns while copying data into redshift from S3 using copy command

I have a CSV table in S3 with 100's of attributes/features, I don't want to create table in RedShift with all these attributes before importing data. Is there anyway to select only the columns I need while copying data from S3 into Redshift?

Upvotes: 2

Views: 9517

Answers (2)

Sailendra Pinupolu
Sailendra Pinupolu

Reputation: 1138

There are couple of options listed in aws forum for this problem, take a look at https://forums.aws.amazon.com/message.jspa?messageID=432590 if they may work for you.

Upvotes: 0

Piyush Patil
Piyush Patil

Reputation: 14523

You cannot achieve the above using just a copy command it is doable using a python script. Please go through this

Read specific columns from a csv file with csv module?

Upvotes: 0

Related Questions