rOSHNI
rOSHNI

Reputation: 21

Implementation of foreign key relationships in hive

I was trying to create a hive table with a foreign key relationship with another table but I am facing errors with that.

Isn't it possible to implement a foreign key relationship in a hive table?

Upvotes: 0

Views: 2304

Answers (1)

masoumeh
masoumeh

Reputation: 478

hive does not implement foreign keys refer to Hadoop Tutorials which describes as below:

Like any other SQL engines, we don't have any primary keys and foreign keys in Hive as hive is not meant to run complex relational queries. It's used to get data in easy and efficient manner. So while designing hive schema, we don't need to bother about selecting unique key etc. Also we don't need to bother about normalizing the set of data for efficiency.

Upvotes: 2

Related Questions