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 ?

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

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

Super 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.

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

@sunile.manjee ,

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

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

Super Guru

Not according to that Jira. It is well documented.