Reputation: 13568
Is there an option to load a CSV into Redshift with a header? I see the documentation for CSV but it says nothing about a header. Ideally it could use the header to determine the columns to load.
Upvotes: 34
Views: 46136
Reputation: 269400
Use the IGNOREHEADER 1
option when using the COPY
command:
IGNOREHEADER [ AS ] number_rows
Treats the specified number_rows as a file header and does not load them. Use IGNOREHEADER to skip file headers in all files in a parallel load.
See: Amazon Redshift COPY
command documentation
Upvotes: 63