Support Questions

Find answers, ask questions, and share your expertise

How to create a table with a one of the column having default value in Hive 2.0 ?

avatar

I'm searching for the equivalent of default syntax in Hive

Hana Syntax :

Create column table  Employee
( NAME NVARCHAR(10),
JOIN_DATE SECONDDATE DEFAULT CURRENT_TIMESTAMP)
3 REPLIES 3

avatar
Master Guru

@Prathamesh H Interesting question. This topic was proposed here:

https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=75977362

And default value seems to be implemented in Hive 3

https://issues.apache.org/jira/browse/HIVE-18726

Sunile -

When an "Answer" addresses/solves your question, please select "Accept" beneath that answer. This encourages user participation in this forum.

avatar

@sunile.manjee ,

We are using Hive 2.0. Can't this scenario me handled here ?

avatar
Master Guru

Not according to that Jira. It is well documented.