Created 07-21-2017 02:13 PM
We have Hive 2.1 in our system and looking to update bulk records daily once. I see there is a feature called merge in hive 2.2 which will solve this purpose. But is there any way I can update bulk records in lower versions using Hive Transactions.
Created 07-26-2017 12:34 AM
You can use usual hive update to update bulk records:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Update
Merge is more flexible and a bit different than a plain update. But if you are only performing only updates I do not see any reason not be able to do it using update statement from Hive 0.14.
Created 07-26-2017 08:48 AM
@rbiswasThank you for your answer.
I think with the help of update statement we can update multiple columns of a record for a specific where clause. And we can use where clause for a set of matching values using IN to update column values in multiple records with the same value. But I have a situation where I need to update multiple columns of multiple records with a set of values. Something like a similar kind of Merge operation where I need to retrieve the values from another hive table and update the transaction table. As far as I know update feature will not allow sub queries.
Is there any other way which I am missing for this scenario?