RedShift-带有换行符的CSV加载 [英] RedShift - CSV load with line Break
本文介绍了RedShift-带有换行符的CSV加载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图在加载时加载CSV文件时出现错误
Im trying to load a CSV file while loading I got the error
定界符缺少结束引号
Delimited value missing end quote
CSV文件错误行
REDSHIFT错误:
line_number | 13
colname | Comment
col_length | 250
raw_line |"123"|"123"|"xyz"|"2009-06-25 21:00:14.660000000"|"0"|""|""|""|""|""|"HI,
raw_field_value | HI,
err_code | 1214
err_reason | Delimited value missing end quote
推荐答案
您需要对源数据中的换行符进行转义,然后指定 ESCAPE $
COPY
语句中的c $ c>选项。请查看使用ESCAPE选项准备用于COPY的文件 以获取更多详细信息。
You'll need to escape the newline characters in the source data and then specify the ESCAPE
option in your COPY
statement. Please have a look at "Preparing Files for COPY with the ESCAPE Option" for more details.
这篇关于RedShift-带有换行符的CSV加载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文