Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redshift - Adding a column, do we have to change our previous CSVs to include it?

I currently have a redshift table in our database that has 10 columns, and I want to add another. It's trivial to do an alter table to do this.

My question - When I do this, will all my old CSV files fail to insert into redshift (via COPY from S3) given they won't have this new column?

I was hoping the columns would just be NULL vs. it failing on import, but I haven't seen any documentation on this.

Ideally I wish I could specify the actual column name in the header row of the CSV, but I haven't seen if that is possible anywhere.

like image 482
Geesu Avatar asked Apr 17 '14 14:04

Geesu


1 Answers

FILLRECORD in COPY command does that: 'Allows data files to be loaded when contiguous columns are missing at the end of some of the records'.

like image 138
Mauricio De Diana Avatar answered Oct 04 '22 20:10

Mauricio De Diana