aws redshift load data兼容无效字符

redshift默认utf8编码。但有时会遇到无法解码的invalid char,报错停下来。在数据侧的解决方案是加上ACCEPTINVCHARS选项

copy <your_table_name> from <your_data_source.csv>
credentials 'aws_access_key_id=<your_key_id>;aws_secret_access_key=<your_secret_access_key>'
delimiter ‘,’
acceptinvchars;

这样会把无效字符替换为?,如"hell?o"而不报错





posted @ 2017-09-26 11:05  Els0n  阅读(333)  评论(0编辑  收藏  举报