Reply
Explorer
Posts: 15
Registered: ‎05-01-2015

Data deletion from Hbase table---- Very urgent...

Hi,

 

I had one hbase table and it is integrated with hive external table.

 

Now I want to delete hbase data using hive external table.(Integrated table)

 

Would you please provide me the syntax how to delete hbase data usin hive external table.

 

 

Regards,

KSReddy

Posts: 1,896
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

Re: Data deletion from Hbase table---- Very urgent...

This is not possible. Hive has a DELETE FROM syntax support in CDH 5.4 but only for tables set to use the transaction support. I'm uncertain if this would work for just about any HBase backed table, however.

Have you considered using Apache Phoenix as the SQL front-end for HBase instead of Hive? We provide Apache Phoenix as part of Cloudera Labs: http://blog.cloudera.com/blog/2015/05/apache-phoenix-joins-cloudera-labs/

Phoenix supports DELETE FROM for the HBase tables: https://phoenix.apache.org/language/index.html#delete

[Off-topic P.s.] FWIW, http://www.catb.org/esr/faqs/smart-questions.html#urgent
Explorer
Posts: 15
Registered: ‎05-01-2015

Re: Data deletion from Hbase table---- Very urgent...

Hi Harsha,

 

I really appreciate for your quick respose. I had one more scenario,please provide me answer.

 

I had one Hbase table,and storing data daily through streaming data(Spark).

Now I want to delete the previous day records from Hbase table.

 

Ex: Assume today date is July29,2015.I want to delete 28th data from Hbase table.

 

Would you please provide me code to delete previous day data from Hbase.....

 

 

Regards,

KSReddy

Posts: 1,896
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

Re: Data deletion from Hbase table---- Very urgent...

If the deletion period is consistent (and therefore automate-able), why not
simply use the Row TTL feature in HBase?

Explorer
Posts: 15
Registered: ‎05-01-2015

Re: Data deletion from Hbase table---- Very urgent...

HI ,

 

You mean we can delete data using TTL?

 

Would you please elobrate it and also please provide me sample code to delete it using TTL

 

This is very urgent...

 

 

Regards,

KSreddy

Highlighted
Posts: 1,896
Kudos: 433
Solutions: 303
Registered: ‎07-31-2013

Re: Data deletion from Hbase table---- Very urgent...

Announcements

Our community is getting a little larger. And a lot better.


Learn More about the Cloudera and Hortonworks community merger planned for late July and early August.