Redshift COPY command delimiter not found

后端 未结 7 1650
有刺的猬
有刺的猬 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:46

    From my understanding the error message Delimiter not found may be caused also by not specifying correctly the COPY command, in particular by not specifying the Data format parameters https://docs.aws.amazon.com/redshift/latest/dg/r_COPY.html

    In my case I was trying to load Parquet data with this expression:

    COPY my_schema.my_table
    FROM 's3://my_bucket/my/folder/'
    IAM_ROLE 'arn:aws:iam::my_role:role/my_redshift_role'
    REGION 'my-region-1';
    

    and I received the Delimiter not found error message when looking into the table stl_load_errors. But expressed in this way:

    COPY my_schema.my_table
    FROM 's3://my_bucket/my/folder/'
    IAM_ROLE 'arn:aws:iam::my_role:role/my_redshift_role'
    FORMAT AS PARQUET;
    

    solved my problem and I was able to correctly load the data.

提交回复
热议问题