Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hive creating a table but getting FAILED: SemanticException [Error 10035]: Column repeated in partitioning columns

Tags:

hadoop

hive

Here is the code I am using to create the table:

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;

I don't really know what the problem is, does anyone have suggestions?

like image 869
user3121369 Avatar asked Dec 17 '14 21:12

user3121369


1 Answers

Partition by columns should not be in create table definition. Partition by columns will be automatically added to table columns.

like image 85
Pravin Bange Avatar answered Sep 20 '22 13:09

Pravin Bange