I am trying to load data into AWS redshift using following command
我正在尝试使用以下命令将数据加载到AWS redshift中
copy venue from 's3://mybucket/venue'
credentials 'aws_access_key_id=<access-key-id>;aws_secret_access_key=<secret-access-key>'
delimiter '\t';
but data load is failing, when I checked Query section for that specific load I noticed it failed because of "Bad UTF8 hex sequence: a4 (error 3)"
但是数据加载失败了,当我检查查询部分的特定加载时,我注意到它失败了,因为“糟糕的UTF8十六进制序列:a4(错误3)”
Is there a way to skip bad records in data load into redshift?
是否有一种方法可以将数据负载中的坏记录跳过为红移?
1 个解决方案
#1
35
Yes, you can use the maxerror parameter. This example will allow up to 250 bad records to be skipped (the errors are written to stl_load_errors):
是的,您可以使用maxerror参数。这个例子将允许跳过最多250条错误记录(错误被写到stl_load_errors):
copy venue from 's3://mybucket/venue' credentials 'aws_access_key_id=;aws_secret_access_key=' delimiter '\t' maxerror as 250;
#1
35
Yes, you can use the maxerror parameter. This example will allow up to 250 bad records to be skipped (the errors are written to stl_load_errors):
是的,您可以使用maxerror参数。这个例子将允许跳过最多250条错误记录(错误被写到stl_load_errors):
copy venue from 's3://mybucket/venue' credentials 'aws_access_key_id=;aws_secret_access_key=' delimiter '\t' maxerror as 250;