赞
踩
hive建表语法中的分隔符设定
hive> create table t(id struct<id1:int,id2:int,id3:int>,name array<string>,xx map<int,string>)
row format delimited
fields terminated by '\t'
collection items terminated by ','
map keys terminated by ':'
lines terminated by '\n';
OK
Time taken: 0.287 seconds
ROW FORMAT DELIMITED 必须在其它分隔设置之前,也就是分隔符设置语句的最前
LINES TERMINATED BY必须在其它分隔设置之后,也就是分隔符设置语句的最后,否则会报错
参考:https://www.imooc.com/article/12213
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。