【发布时间】:2019-02-20 10:15:43
【问题描述】:
我在“hbase”表中有两个值 id 和 name 的行、列族 h1 “hbase_sample”。 我想用 id 和 name 列在 hive 中创建外部表,我不 想写行或关键字段。
hive> create external table sample (id string,name string)
> STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
> with serdeproperties ("hbase.columns.mapping"=":key,h1:id,h1:name")
> tblproperties("hbase.table.name"="sample_hbase");
FAILED: Execution Error, return code 1 from
org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException:
MetaException(message:org.apache.hadoop.hive.serde2.SerDeException
org.apache.hadoop.hive.hbase.HBaseSerDe: columns has 2 elements while
hbase.columns.mapping has 3 elements (counting the key if implicit))
【问题讨论】:
标签: hadoop hive hbase bigdata hiveql