Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

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

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

Explorer

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

5 REPLIES 5

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

Master Guru
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

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

Explorer

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

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

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

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

Explorer

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

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

Master Guru