如何处理redshift负载中的换行符? [英] How to deal with Linebreaks in redshift load?
本文介绍了如何处理redshift负载中的换行符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个csv,其中一列中有换行符.我收到未找到分隔符的错误.
I have a csv which has line breaks in one of the column. I get the error Delimiter not found.
如果我将文本替换为不带换行符的连续文本,那么它将起作用.但是我该如何处理换行符.
If I replace the text as continuous without line-breaks then it works. But how do I deal with line-breaks.
我的COPY命令:
COPY cat_crt_test_scores
from 's3://rds-cat-crt-test-score-table/checkcsv.csv'
iam_role 'arn:aws:iam::423639311527:role/RedshiftS3Access'
explicit_ids
delimiter '|'
TIMEFORMAT 'auto'
ESCAPE;
直到阅读 Dear Conduira,
推荐答案
如 John Rotenstein 所建议注释,使用CSV选项是解决此问题的正确方法.
As suggested by John Rotenstein in the comments, using the CSV option is the right way to deal with this.
在此处给出了更详细的答案.
A more detailed answer is given here.
这篇关于如何处理redshift负载中的换行符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文