You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Ramasubramanian <ra...@gmail.com> on 2012/09/11 15:07:36 UTC

How to update and delete a row in hive

Hi,

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

Regards,
Rams

Re: How to update and delete a row in hive

Posted by Bejoy KS <be...@yahoo.com>.
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. 
 
Regards,
Bejoy KS


________________________________
 From: "Connell, Chuck" <Ch...@nuance.com>
To: "user@hive.apache.org" <us...@hive.apache.org> 
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:ramasubramanian.narayanan@gmail.com] 
Sent: Tuesday, September 11, 2012 9:08 AM
To: user@hive.apache.org
Subject: How to update and delete a row in hive

Hi,

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

Regards,
Rams

RE: How to update and delete a row in hive

Posted by "Connell, Chuck" <Ch...@nuance.com>.
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:ramasubramanian.narayanan@gmail.com] 
Sent: Tuesday, September 11, 2012 9:08 AM
To: user@hive.apache.org
Subject: How to update and delete a row in hive

Hi,

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

Regards,
Rams