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 fields ID and VALUE.
I need to write the rows from table B, which has no matching ID and VALUE fields in table C, to 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
is not working, as I referred the right side table in WHERE clause, which should not be done.
How to form the equivalent query without referrring the right side table in the WHERE clause.
Any other solution?