hive创建hbase表映射

将hbase中的表映射至hive中,便于表的操作

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;

效果:

hive创建hbase表映射_第1张图片

你可能感兴趣的:(hive,hbase,hadoop,大数据)