I am using HDP 2.5 in hortonworks sanbox. The HIVE version is 1.2.1. I am trying to create hive table with primary key constraint with below query:
CREATE TABLE pk
(id1 int,id2 int,
PARTITIONED BY (year string);
while executing this create table query it throws below error:
ParseException line 1:65 cannot recognize input near 'key' '(' 'id1' in column type
I am not getting what this error and how to resolve it.
Is constraints supported in HIVE 1.2.1 ?
can anyone help me out to resolve this issue ?
Based on this jira
and the hive docs:
This is supported from hive 2.1.0 onwards only.
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
View solution in original post