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