user8167344
user8167344

Reputation: 353

Getting Error while creating Hive External Table on top of Hbase Table

I am creating hive external table on top of Hbase table so that I can analyse data using Hive but as I run the script for creating table using Hbase serde it throws error 'Hbase Table doesn't Exists.Kindly check the attached image of error.Kindly guide.

enter image description here'

Upvotes: 0

Views: 671

Answers (1)

notNull
notNull

Reputation: 31460

If your HBase table has created in specific namespace (network_tower) then you are not mentioning correct syntax how to access a table from specific namespace in HBase.

In tblproperties include :(colon) to access a table from HBase namespace instead of .(period)

TBLPROPERTIES("hbase.table.name" = "network_tower:orders")

Sample HBase-Hive ddl:

CREATE EXTERNAL TABLE test(rowkey string, ...)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,cf:...")
TBLPROPERTIES("hbase.table.name" = "network_tower:orders");

As you are creating external table so the HBase table needs to be existed already,

Make sure the table exists in HBase.

bash$ hbase shell
hbase(main):> scan 'network_tower:orders',{LIMIT=>1}

Upvotes: 1

Related Questions