create external table tableName(
column type
)
STORED BY 'org.apache.hadoop.hive.hbase.HbaseStorageHandler'
WITH SERDEPROPERTIES (
"hbase.columns.mapping" = ":key,record:/confirm/iCount,record:/confirm/iIncrease"
)TBLPROPERTIES(
"hbase.table.name"="hbase_namespace:tableName",
"hbase.mapred.output.outputtable"="hvieTableName"
);
hvie创建表 csv 文件 并去除表头
create database databaseName;
use database;
drop table if exists tableName;
create external table tableName(
column type
)
row format serde 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
with serdeproperties(
'separatorChar'=',',
'quoteChar'='"',
'escapeChar'='\'
)
location '/app/data/exam'
tblproperties('skip.header.line.count'='1');



