Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # user >> How to update and delete a row in hive

Ramasubramanian 2012-09-11, 13:07
Connell, Chuck 2012-09-11, 13:13
Copy link to this message
Re: How to update and delete a row in hive
Hi Rams

Adding on to Chuck's comments. In hive you can get a work around for updates and deletes only by overwriting a table or atleast a partition if table is partitioned. If updates cannot be avoided for your use case, I suggest you to partition and sub partition your table accordingly so that only less volume of data is overwritten every time. Also to ensure performance while partitioning you need to ensure that all or most of the sub partitions contains data volume atleast equal to your block size. 
Bejoy KS
 From: "Connell, Chuck" <[EMAIL PROTECTED]>
Sent: Tuesday, September 11, 2012 6:43 PM
Subject: RE: How to update and delete a row in hive
Hive does not support row-level (or field-level) updates. It is designed as a WORM (write once read many) data warehouse.

You can of course code your own row updates by reading an entire Hive file, modifying a row, then writing the file back to Hive.

Chuck Connell
Nuance R&D Data Team
Burlington, MA
-----Original Message-----
From: Ramasubramanian [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, September 11, 2012 9:08 AM
Subject: How to update and delete a row in hive


What is the command to update/delete a row from hive? If not directly possible what is the work around for that?