温馨提示:本文翻译自stackoverflow.com,查看原文请点击:hadoop - failed during adding a partition in hive external tables

hadoop - 在配置单元外部表中添加分区期间失败

发布于 2020-03-29 12:50:56

我想在蜂巢cli中创建一个简单的外部表,创建分区时出现错误。我已经在Google上进行搜索,但是无法获得正确的结果。你能帮忙吗

hive (sampledb)> create external table externalhive(id int,name varchar(100),age tinyint,city varchar(100),state varchar(100)) partitioned by (year string)
            > row format delimited fields terminated by '/t' stored as textfile location '/user/ah12x/external';                                      
OK
Time taken: 0.169 seconds
hive (sampledb)> show tables;
OK
externalhive

hive (sampledb)> alter table externalhive add partition (year ='2014')
            > location ('/2012');                                  
FAILED: ParseException line 2:9 extraneous input '(' expecting StringLiteral near '<EOF>'

查看更多

查看更多

提问者
Anish Gopinath
被浏览
33
serge_k 2020-01-31 16:19

发布
问题

分享
好友

手机
浏览

扫码手机浏览