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

StackOverflow https://stackoverflow.com/questions/23136101

  •  05-07-2023
  •  | 
  •  

Вопрос

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.

Это было полезно?

Решение

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'.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top