将hbase中的表映射至hive中,便于表的操作
sql
create external table student_info(
id string,
student_name string,
gender string,
pwd string,
school_name string,
location string
)
stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' with
serdeproperties('hbase.columns.mapping'=':key,baseinfo:name,baseinfo:gender,baseinfo:pwd,schoolinfo:name,schoolinfo:location')
tblproperties ('hbase.table.name'='bigdata888:test001');
select * from student_info;
效果: