我想在蜂巢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>'
谢谢,它成功了!!