AnsweredAssumed Answered

Unable to create Maprdb-hive table

Question asked by SanjeevSukumaran on Jul 6, 2016
Latest reply on Jul 6, 2016 by Hao Zhu


I want to create a Mapr-db-Hive table.
I followed the procedure as mentioned in the link:

I create a hive table with the following command.

CREATE TABLE test1 (key INT, first_name STRING,last_name STRING,email STRING,gender STRING,ip_address STRING);

LOAD DATA LOCAL INPATH './examples/files/Voter1' OVERWRITE INTO TABLE test1;

And I checked the contents of the hive table with:
SELECT * FROM test1;

Next, I entered the following query to create a Maprdb-hive table.

CREATE TABLE mapr_table_1(key int, first_name string,last_name string,email string,gender string,ip_address string)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf1:first_name,last_name,email,gender,ip_address")
TBLPROPERTIES ("" = "/user/mapr/xyz");

With all the colomns except key in colomn family cf1.

But iam getting following error:

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 Error: the HBase columns mapping contains a badly formed column family, column qualifier specification.)

Kindly let me know the correct syntax, as well as sample command if I want to define more than one colomn family.
For example:
first_name and last_name in cf1
email,gender,ip_address in cf2

Kindly help me with the same.

Thanks and regards
Sanjeev Sukumaran