######To create hive table mapping hbase table###
create external table hbase_test_mysql_general(
rowkey string
,id bigint
,current_d string
,current_t string
,current_dt string
,current_z string
,id1 bigint
,id2 int
,id3 bigint
,id4 double
,name char(10)
,name2 string
,ts bigint
,type string
,xid int
)
stored by 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPOPERTIES("hbase.columns.mapping"=":key,cf1:id,cf1:current_d,cf1:current_t,cf1:current_dt,cf1:current_z,
cf1:id1,cf1:id2,cf1:id3,cf1:id4,
cf1:name,cf1:name2,
cf1:ts,cf1:type,cf1:xid")
TBLPROPERTIES("hbase.table.name"="golden3:test_mysql_general");