Alter hive table add primary key

hive

#1

Hello,

  • I am working on CCA175 Section 4 Lecture 51 in which we are creating a daily_revenue table in hive using SQL.
  • I ran describe orders. It lists columns, but there is no mention of a primary key.

So I searched and found this post: https://stackoverflow.com/questions/28537042/unable-to-create-hive-table-with-primary-key#46430301

Which references the hive language manual: https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL

Per the post, as of hive 2.1.0, constraints are supported.

Now, I see a file /usr/hdp/2.5.0.0-1245/hive/lib/hive-cli.jar
which is pointing to hive-cli-1.2.1000.2.5.0.0-1245.jar

So does this mean we have hive version 1.2? I was just trying to create a primary key on the hive table.

Thanks in advance for your help!
-Srini


Practice hive on state of the art Big Data cluster - https://labs.itversity.com