I need to use NOT IN query in Hive.
I have 3 tables A, B and C.
B with fields PRODUCT, ID and VALUE. C with field identifiers and VALUE.
I need to write rows from table B, which does not have the corresponding ID and VALUE fields in table C, in table A.
INSERT OVERWRITE TABLE A a SELECT * FROM B b LEFT SEMI JOIN C c ON (b.ID = c.ID AND b.VALUE = c.VALUE) where b.ID = NULL AND b.VALUE = NULL;
This suggestion from http://stackoverflow.com/questions/25041026/hive-left-semi-join-for-not-exists does not work, as I referenced the right table in the WHERE clause, which should not be done.
How to form an equivalent query without reference to the right table in the WHERE clause.
Any other solution?
hive
Harbinger
source share