My Hive version is 0.13. I have two tables, table_1
and table_2
table_1
contains:
customer_id | items | price | updated_date
------------+-------+-------+-------------
10 | watch | 1000 | 20170626
11 | bat | 400 | 20170625
table_2
contains:
customer_id | items | price | updated_date
------------+----------+-------+-------------
10 | computer | 20000 | 20170624
I want to update records of table_2
if customer_id
already exists in it, if not, it should append to table_2
.
As Hive 0.13 does not support update, I tried using join, but it fails.