[Author]: kwu
从关系库导入数据到hive-hbase表中,关系库到hbase中,可以直接由sqoop来导入,但是我们要对rowkey做特殊处理并加入更新时间,则操作步骤如下:
1、创建hive与hbase的表
1)创建hbase表
命令行输入 hbase shell 进入hbase的终端:
create 'location','cf1'
查询hbase创建的表
list
如需删除表
disable 'location'
drop 'location'
hive -e"
drop TABLE ods.hbase_location;
CREATE EXTERNAL TABLE ods.hbase_location(key string ,
ID int comment '唯一ID',
location1 string comment '国家代号' ,
location2 string comment '省份代号' ,
location3 string comment '城市代号',
country string comment '国家(中文)&#