通过bashshell创建配置单元表时出错

lrpiutwd  于 2021-05-30  发布在  Hadoop
关注(0)|答案(1)|浏览(398)

有人能告诉我为什么在用bashshell创建分区表时出错吗。

[cloudera@localhost ~]$ hive -e "create table peoplecountry (
name1 string,
name2 string,
salary int,
country string
) 
partitioned by (country string)
row format delimited
column terminated by '\n'";

Logging initialized using configuration in jar:file:/usr/lib/hive/lib/hive-common-0.10.0-cdh4.7.0.jar!/hive-log4j.properties
Hive history file=/tmp/cloudera/hive_job_log_0fdf7083-8ab4-499f-8048-a85f162d1357_376056456.txt
FAILED: ParseException line 8:0 missing EOF at 'column' near 'delimited'
50few1ms

50few1ms1#

如果您的意思是在数据的每行末尾换行,那么您需要使用:

line terminated by '\n'

而不是以,
如果您想用分隔符分隔行中的每一列,请指定为

fields terminated by '\n'

参考:
https://cwiki.apache.org/confluence/display/hive/languagemanual+ddl

相关问题