创建分区到HIVE中的现有物理列

hjzp0vay  于 5个月前  发布在  Hive
关注(0)|答案(1)|浏览(70)

是否可以在HIVE中创建一个分区列作为表列之一的表?
for ex:create table test(a int,b string,c int)partitioned by(c int)
当运行上面的代码时,它会得到这个错误“Error while compiling statement:FAQs:SemanticException [Error 10035]:Column repeated in partitioning columns”(编译语句时出错:FAQs:SemanticException [Error 10035]:分区列中的列重复)。

eimct9ow

eimct9ow1#

这是可能的,你几乎是正确的。正确的语法是-

create table test (a int, b string) partitioned by (c int)

字符串

相关问题