HIVE Creating Table not null
Asked Answered
S

2

6

this is my query in DB2 Database:

CREATE TABLE MY_TABLE                                                 
      (COD_SOC              CHAR(5)  NOT NULL); 

Is possible reproduce the 'NOT NULL' in HIVE? What about PIG?

Streetcar answered 7/8, 2014 at 15:34 Comment(0)
F
9

No it is not possible at this time. It would be very difficult for Hive to enforce column constraints.

Filet answered 7/8, 2014 at 21:51 Comment(2)
Has this behavior changed recently in any Hive version ?Leman
I don't know if it has changed recentlyFilet
B
1

With Hive 3.0, you can have DEFAULT Constraints on the hive table

Refer 1. https://www.adaltas.com/en/2019/07/25/hive-3-features-tips-tricks/ 2. https://www.slideshare.net/Hadoop_Summit/what-is-new-in-apache-hive-30

Bechuanaland answered 6/5, 2020 at 20:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.