Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 08-30-2018 11:35 AM
Hi,
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,
name string,
dept string,
primary key(id1,id2)
disable novalidate)
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 typeI 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 ?
Thank You.
Created 08-30-2018 01:20 PM
Based on this jira
https://issues.apache.org/jira/browse/HIVE-13290
and the hive docs:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Constraints
This is supported from hive 2.1.0 onwards only.
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 08-30-2018 01:20 PM
Based on this jira
https://issues.apache.org/jira/browse/HIVE-13290
and the hive docs:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-Constraints
This is supported from hive 2.1.0 onwards only.
HTH
*** If you found this answer addressed your question, please take a moment to login and click the "accept" link on the answer.
Created 08-31-2018 06:50 AM
Thank you.