Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignoreheader CSV file using Redshift

I am copying a CSV file into a redshift table but I keep getting an error because it is infering the header of the csv file. Is there any way to ignore the header when loading csv files into redshift. I am new to redshift so all the help would be appreciated.

Here is my copy statement:

copy db.table1
from 's3://path/203.csv'
credentials 'mycrednetials'
csv
ignoreheader
delimiter ','
region 'us-west-2' ;

Any input would highly be appreciated.

like image 589
Coder123 Avatar asked Feb 25 '26 03:02

Coder123


1 Answers

Try this:

copy db.table1
from 's3://path/203.csv'
credentials 'mycrednetials'
csv
ignoreheader 1
delimiter ','
region 'us-west-2' ;
like image 134
zip Avatar answered Mar 02 '26 16:03

zip