hive创建表但获取失败:semanticexception[error 10035]:列在分区列中重复

qqrboqgw  于 2021-05-30  发布在  Hadoop
关注(0)|答案(3)|浏览(949)

下面是我用来创建表的代码:

CREATE TABLE vi_vb(cTime STRING, VI STRING, Vital STRING, VB STRING)
PARTITIONED BY(cTime STRING, VI STRING)
CLUSTERED BY(VI) SORTED BY(cTime) INTO 32 BUCKETS
ROW FORMAT DELIMITED
    FIELDS TERMINATED BY '1'
    COLLECTION ITEMS TERMINATED BY '2'
    MAP KEYS TERMINATED BY '3'
STORED AS SEQUENCEFILE;

我真的不知道问题出在哪里,有人有什么建议吗?

5ssjco0h

5ssjco0h1#

CREATE TABLE vi_vb(Vital STRING, VB STRING)
PARTITIONED BY(cTime STRING, VI STRING)
CLUSTERED BY(VI) SORTED BY(cTime) INTO 32 BUCKETS
ROW FORMAT DELIMITED
    FIELDS TERMINATED BY '1'
    COLLECTION ITEMS TERMINATED BY '2'
    MAP KEYS TERMINATED BY '3'
STORED AS SEQUENCEFILE;
ars1skjm

ars1skjm2#

按列划分不应在创建表定义中。按列划分将自动添加到表列中。

zengzsys

zengzsys3#

列“ctime,vi”被定义为普通列和分区列。

相关问题