Redshift COPY command delimiter not found

后端 未结 7 1677
有刺的猬
有刺的猬 2021-02-02 07:09

I\'m trying to load some text files to Redshift. They are tab delimited, except for after the final row value. That\'s causing a delimiter not found error. I only see a way to s

7条回答
  •  遇见更好的自我
    2021-02-02 07:19

    I know this was answered, but I just dealt with the same error and I had a simple solution so i'll share it.

    This error can also be solved by stating the specific columns of the table that are copied from the s3 files (if you know what are the columns in the data on s3). In my case the data had less columns than the number of columns in the table. Madahava's answer with the 'FILLRECORD' option DID solve the issue for me but then I noticed a column that was supposed to filled up with default values, remained null.

    COPY  (col1, col2, col3) from 's3://somebucket/file' ...
    

    提交回复
    热议问题