Gubi
Gubi

Reputation: 415

COPY ignore blank columns

Unfortunately I've got some huge number of csv files with missing separator as following. Notice the second data got only 1 separator with 2 values. Currently I'm getting "delimiter not found error".

Only if I could insert NULL to 3rd column in case there is only two values.

1,avc,99
2,xyz
3,timmy,6

Is there anyway I can COPY this files into Redshift without modifying CSV files?

Upvotes: 0

Views: 2986

Answers (1)

shazeline
shazeline

Reputation: 503

Use the FILLRECORD parameter to load NULLs for blank columns

You can check the docs for more details

Upvotes: 3

Related Questions