Member since
05-28-2017
1
Post
0
Kudos Received
0
Solutions
05-28-2017
06:46 PM
I am using HDP2.6 I want to create a hive external table I am following this.
I have created a table in phoenix using the below command CREATE TABLE IF NOT EXISTS tmp (
cola varchar,
colb varchar,
constraint my_cons primary key(cola)
); Now after opening the hive console I do the following hive> add jar /usr/hdp/2.6.0.3-8/phoenix/phoenix-hive.jar;
hive> create external table tmp ( cola string, colb string) STORED BY 'org.apache.phoenix.hive.PhoenixStorageHandler' TBLPROPERTIES ( "phoenix.zookeeper.quorum" = "sandbox.hortonworks.com", "phoenix.zookeeper.znode.parent" = "hbase-unsecure", "phoenix.zookeeper.client.port" = "2181",'autocreate'='true','autodrop'='true',"phoenix.rowkeys" = "cola", "phoenix.column.mapping" = "cola:cola,colb:colb" ); The table gets created but when I run select * from tmp; I get the following exception Failed with exception java.io.IOException:java.lang.RuntimeException: org.apache.phoenix.schema.ColumnNotFoundException: ERROR 504 (42703): Undefined column. columnName=cola Though the exception seems obvious i am not able to resolve this. Please help
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Phoenix