When you receive below error message from AWS redshift while executing
use copy command then use 'ACCEPTINVCHARS ESCAPE' syntax in copy
command:
Error Code: 'String contains invalid or unsupported UTF8 codepoints. Bad UTF8 hex sequence: b6 (error 3) '
COPY <tablename> from 's3://bucket/folder/file.txt'
CREDENTIALS '**********;aws_secret_access_key=******'
DELIMITER '|' ACCEPTINVCHARS ESCAPE IGNOREHEADER 1;
Error Code: 'String contains invalid or unsupported UTF8 codepoints. Bad UTF8 hex sequence: b6 (error 3) '
COPY <tablename> from 's3://bucket/folder/file.txt'
CREDENTIALS '**********;aws_secret_access_key=******'
DELIMITER '|' ACCEPTINVCHARS ESCAPE IGNOREHEADER 1;
Cool thanks, that helps!
ReplyDeleteBut if we have a csv format then how to deal?
ReplyDeleteError: Invalid operation: CSV is not compatible with ESCAPE;
Helps thanks for the share.
ReplyDeleteThanks a lot man ! :) Helped with the issue.
ReplyDelete