Hive-Hbase 集成 - 插入数据时出现问题



我能够成功地将Hive和Hbase集成为直接的场景(无分区和存储桶(。我能够在Hive和hbase中插入数据,用于这些简单的场景。

我在 Hbase 中存储的 Hive 分区表出现问题。我能够执行"创建DDL"语句。当我尝试执行插入时,我收到一条错误消息,指出"必须指定表名">

CREATE TABLE hivehbase_customer(id int,holdid int,fname string,lname string,address string,zipcode string) 
partitioned by (city string) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler' 
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,personal_data:hold_id,personal_data:f_name,personal_data:l_name,personal_address:address,personal_address:zipcode") 
TBLPROPERTIES ("hbase.table.name" = "hivehbase_custom", "hbase.mapred.output.outputtable" = "hivehbase_custom");
insert into table hivehbase_customer partition(city= 'tegacay') values (7394,NULL,NULL,NULL,NULL,29708);

尝试以下插入查询

insert into table hivehbase_customer partition(city) values (7394,NULL,NULL,NULL,NULL,29708,'tegacay');

实际分区列需要指定为插入查询的最后一列。

最新更新