Update Hbase Table data in HIVE and Impala

Category : Hadoop | Sub Category : Apache HBase | By Prasad Bonam Last updated: 2020-10-17 16:11:52 Viewed : 489


Update Hbase Table data in HIVE and Impala

--Create table in HIVE

 --Create table in HIVE

CREATE external TABLE Employee (

rowKey string,

empId string,

empName string,

location string,

salary string

  )

stored BY `org.apache.hadoop.hive.hbase.HBaseStorageHandler`

 WITH serdeproperties ( "hbase.columns.mapping" = ":key,

 cf:empId,cf:empName,cf:location,cf:salary"

 )

 tblproperties("hbase.table.name" = "Employee") 

 Hive:  Run above script in Hive browser as follows
Impala:
INVALIDATE METADATA is used for making Impala node aware of the the new tables.
 Run  `INVALIDATE METADATA Employee`  in Impala as follows

Now, Run query in Impala to see the Employee data






Search
Related Articles

Leave a Comment: