1
私は列ファミリ(名前、連絡先)と列、名前(文字列)、年齢(文字列)、workStreet(文字列)、workCity(文字列)、workState(文字列)で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