I have a small demo table in Hbase and I want to operate it
through Hive.Here is my table in Hbase -
hbase(main):021:0> scan 'employee'
2 row(s) in 0.0260 seconds
I have 2 rows in the employee table, each corresponding to a
particular user. And I have 3 column families (each having only 1
column) - no, name and address.
For this table I have created an external table in Hive using the
following command -
hive> CREATE EXTERNAL TABLE employee(key string,no string,name
string,address string) > STORED BY
> WITH SERDEPROPERTIES ("hbase.columns.mapping" "no:,name:,address:") > TBLPROPERTIES("hbase.table.name"
But i am getting the following error -
FAILED: Error in metadata: java.lang.RuntimeException:
org.apache.hadoop.hive.hbase.HBaseSerDe: hbase column family 'no'
should be mapped to Map<String,?> but is mapped to string)FAILED:
Execution Error, return code 1 from
Could someone point out my mistake??Also, I would like to know whether
the field "key" corresponds to each row in the Hbase table i.e emp1
and emp2 or am I getting the concept wrong??I was going through the
wiki, but could not find the proper explanation there.Sorry if my
question seems childish.