Hive是否接受'\r\n'
终止的 CTRL 行?我必须为Windows生成一个文本文件,并希望使用CRLF进行行终止。如果是这样,你能否告诉我是否给出了正确的答案?
'\r\n'
答案 0 :(得分:0)
在配置单元documentation中,行分隔符为char
,因此不应接受两个字符!
row_format : DELIMITED [FIELDS TERMINATED BY char [ESCAPED BY char]] [COLLECTION ITEMS TERMINATED BY char] [MAP KEYS TERMINATED BY char] [LINES TERMINATED BY char] [NULL DEFINED AS char] (Note: Only available starting with Hive 0.13)
答案 1 :(得分:0)
目前仅支持\n
看看这张JIRA门票。
演示
hive> create table t (i int) row format delimited lines terminated by '\r\n' location '/tmp';
FAILED: SemanticException 1:64 LINES TERMINATED BY only supports newline '\n' right now. Error encountered near token ''\r\n''
hive>