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?

Edge7
  • 681
  • 1
  • 15
  • 35

2 Answers2

9

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

Mike Park
  • 10,845
  • 2
  • 34
  • 50
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

KarthiS
  • 684
  • 5
  • 6