1
我有一個與列家族(名稱,聯繫人)和列,名稱(字符串),年齡(字符串),workStreet(字符串),工作城市(字符串),工作狀態(字符串)的hbase表。如何使用指向hbase表的複雜數據類型創建外部配置單元表?
我想創建一個外部配置單元表,它指向這個hbase表中的以下列。
名稱(字符串),年齡(字符串),地址(結構)。
CREATE EXTERNAL TABLE hiveTable(id INT,name STRING, age STRING,
address STRUCT<Street:STRING,City:STRING,State:STRING>)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" ="Name:name,Name:age,Contact:workStreet, Contact:workCity, Contact:workState")
TBLPROPERTIES("hbase.table.name" = "hbaseTable");
它跑進了以下錯誤,
Error while processing statement: 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 3 elements while hbase.columns.mapping
has 5 elements (counting the key if implicit))
[你檢查嗎?](https://cwiki.apache.org/confluence/display/Hive/HBaseIntegration) –
@RamPrasadG感謝您的幫助。 – sen