导航

hive处理hbase数据

Posted on 2016-01-30 13:10  ggzone  阅读(145)  评论(0编辑  收藏  举报
CREATE EXTERNAL TABLE table1(
key  string,
zoneid  int,
result  int,
) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES
("hbase.columns.mapping" = 
":key,t:ZoneID,t:Result")
TBLPROPERTIES("hbase.table.name" = "Table1");

hbase表名:Table1,列族:t