Support Questions

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

Can we create a external table in Hive with HBase Handler with store as AVRO

avatar
Rising Star
 
1 ACCEPTED SOLUTION

avatar
Master Guru

@Gayathri Devi, We cannot create Hive-Hbase table in Avro format.

As Hive is just a wrapper on top of HBase table. HBase having all the data got stored and we are mapping fields to Hive table and just exposing data in Structured manner from Hive.

If you want to create Avro (or) orc format table then you can prepare a snapshot table and use them for your needs.

Create table default.avro_table stored as avro as select * from hive_hbase_tablename;
Create table default.orc_table stored as orc as select * from hive_hbase_tablename;

In this way you can create Avro (or) orc tables for Hive-Hbase tables and you can use where clause to get only the required data from hive_hbase_table.

View solution in original post

1 REPLY 1

avatar
Master Guru

@Gayathri Devi, We cannot create Hive-Hbase table in Avro format.

As Hive is just a wrapper on top of HBase table. HBase having all the data got stored and we are mapping fields to Hive table and just exposing data in Structured manner from Hive.

If you want to create Avro (or) orc format table then you can prepare a snapshot table and use them for your needs.

Create table default.avro_table stored as avro as select * from hive_hbase_tablename;
Create table default.orc_table stored as orc as select * from hive_hbase_tablename;

In this way you can create Avro (or) orc tables for Hive-Hbase tables and you can use where clause to get only the required data from hive_hbase_table.