CREATE TABLE hbase_staff_A(
id int,
name string,
job string,
mgr int,
hiredate string,
sal double,
comm double,
deptno int)
STORED BY ‘org.apache.hadoop.hive.hbase.HBaseStorageHandler’
WITH SERDEPROPERTIES (“hbase.columns.mapping” = “:key,info:name,info:job,info:mgr,info:hiredate,info:sal,info:comm,info:deptno”)
TBLPROPERTIES (“hbase.table.name” = “hbase_staff_A”);
CREATE TABLE temp_staff(
id int,
name string,
job string,
mgr int,
hiredate string,
sal double,
comm double,
deptno int)
row format delimited fields terminated by ‘\t’;
load data local inpath ‘/opt/fz/ww.txt’ into table temp_staff;
insert into table hbase_staff_A select * from temp_staff;