CREATE TABLE hbase_table_1 (key int,value1 string,value2 int,value3 int) 存储 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' WITH SERDEPROPERTIES ( “hbase.columns.mapping”=“:key,a:b,a:c,d:e” );
INSERT OVERWRITE TABLE hbase_table_1 SELECT foo,bar,foo + 1,foo + 2 从 pokes WHERE foo = 98 OR foo = 100;
我是hbase和hive的新手?当我想从hive自动导入数据到hbase时, 在官方网站[https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration]
上找到此页面这是apache示例!我无法理解这个属性的价值? 有人可以向我解释一下???
我想知道如何设置此属性的值!
由于
答案 0 :(得分:0)
Create Hive Integrated Hbase Table:
hive -e "INSERT OVERWRITE TABLE hivedbnm.hivehbasetblnm
SELECT * FROM hivedbnm.temphivetable;"
CREATE TABLE ${hiveconf:hivedbnm}.hivehbasetblnm (
key string, C1 decimal(10,4))
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:C1")
TBLPROPERTIES ("hbase.table.name" = "hbasetblnm", "hbase.mapred.output.outputtable" = "hbasetblnm");