9

I am trying to copy a bunch of csv files from S3 to Redshift using the RedShiftCopyActivity and a datapipeline.

This works fine as long as the csv structure matches the table structure. In my case the csv has less columns than the table and then the RedShiftCopyActivity failes with a "Delimiter not found" error in stl_load_errors.

I would like to use the redshift copy command "columns" option. That way I can make it work, but the columns part of the redshift copy command does not seem to be available in the RedShiftCopyActivity.

Anyone any suggestions?

All tips warmly welcomed.

Many thanks upfront.

Peter

4

1 回答 1

1

我知道这是一个老问题,但现在您可以为 Redshift COPY 命令指定列列表。

COPY tablename (column1 [,column2, ...]) 

从 S3 加载数据时,列顺序需要与源数据的顺序相匹配。在此处查看文档:Amazon Redshift 列映射选项

拉杜

于 2016-04-04T08:29:24.057 回答