在学习hive中partition建表时报错:
FAILED: ParseException line 5:0 cannot recognize input near ‘)’ ‘partitioned’ ‘by’ in column specification
hive> CREATE EXTERNAL TABLE Rating_partition_table
CREATE EXTERNAL TABLE Rating_partition_table
(userId STRING,
movieId STRING,
rating STRING,
)
partitioned by (dt STRING)
row format delimited fields terminated by '\t'
lines terminated by '\n';
后来发现是在编辑时为了快速粘贴的,只修改了字段,最后一个字段加了逗号导致的,删除后ok