Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

how hive can read Hbase current and previous versions data?

avatar
Rising Star
 
1 ACCEPTED SOLUTION

avatar
Master Guru

As far as I know, Hive can read only the current (most recent) data version in HBase. Only when using HBase API or hbase shell you can also read all versions, or only the ones in a specific time interval.

From the Hive HBase integration document: there is currently no way to access the HBase timestamp attribute, and queries always access data with the latest timestamp.

View solution in original post

6 REPLIES 6

avatar
Master Guru

As far as I know, Hive can read only the current (most recent) data version in HBase. Only when using HBase API or hbase shell you can also read all versions, or only the ones in a specific time interval.

From the Hive HBase integration document: there is currently no way to access the HBase timestamp attribute, and queries always access data with the latest timestamp.

avatar
Rising Star

Thanks for replying.

if not hive can impala read all versions in HBase?

avatar
Master Guru

No, Impala cannot read all versions either. Impala defines tables in HBase using Hive DDL because Impala doesn't support custom SerDe's to define tables, and as we saw Hive doesn't expose HBase timestamps (more detail about Impala and HBase here). So, if you want to access timestamps you have to make them "first class citizens" and include them in your Hbase table key, or among values, if you can ensure unique keys by other means.

avatar
Rising Star

thank you 🙂

avatar
Master Guru

Okay, no problems, please consider to accept the answer, to help us manage answered questions. Tnx!

avatar
Super Guru

currently there is no way available to read all the versions data.