HBase-Hive Integration:
Creating an external table in hive for an HBase table allows you to query HBase data o query in Hive without the need for duplicate data. You can simply update or delete data from the HBase table, and you can also view the modified table in Hive.
Example:
You have an hbase table with id , name and email columns.
An example of an external table command for a hive:
CREATE EXTERNAL TABLE hivehbasetable(key INT, id INT, username STRING, password STRING, email STRING) STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,id:id,name:username,name:password,email:email") TBLPROPERTIES("hbase.table.name" = "hbasetable");
For more information on Hive-Hbase integration, see here.
source share