Support Questions

Find answers, ask questions, and share your expertise

impala hbase hive

Explorer

Hello

 

i have created a hbase table, populating it with pig.

To use impala, i create an external table in hive pointing on hbase but when i use impala, i can only see the row_id but not entire row of the table :

 

[localhost:21000] > describe hbase_capacite;
Query: describe hbase_capacite
+---------+--------+---------+
| name    | type   | comment |
+---------+--------+---------+
| row_dy  | string |         |
| calcap  | double |         |
| depcap  | int    |         |
| yearcap | int    |         |
+---------+--------+---------+
Fetched 4 row(s) in 0.01s
[localhost:21000] > select count(*) from hbase_capacite;
Query: select count(*) from hbase_capacite
+----------+
| count(*) |
+----------+
| 22       |
+----------+
Fetched 1 row(s) in 0.57s
[localhost:21000] > select * from hbase_capacite;
Query: select * from hbase_capacite

Fetched 0 row(s) in 0.16s
[localhost:21000] > select row_dy from hbase_capacite;
Query: select row_dy from hbase_capacite
+--------+
| row_dy |
+--------+
| 12005  |
| 12006  |
| 12007  |
| 12008  |
| 12009  |
| 12010  |
| 12011  |
| 12012  |
| 12013  |
| 12014  |
| 12015  |
| 942005 |
| 942006 |
| 942007 |
| 942008 |
| 942009 |
| 942010 |
| 942011 |
| 942012 |
| 942013 |
| 942014 |
| 942015 |
+--------+
Fetched 22 row(s) in 0.16s
[localhost:21000] > select row_dy from hbase_capacite where row_dy='12005';
Query: select row_dy from hbase_capacite where row_dy='12005'
+--------+
| row_dy |
+--------+
| 12005  |
+--------+
Fetched 1 row(s) in 0.12s

 

[localhost:21000] > select * from hbase_capacite;
Query: select * from hbase_capacite

Fetched 0 row(s) in 0.18s
[localhost:21000] >

 

 

why i cant see all the fields of my table when i do a select * ???

 

 

5 REPLIES 5

Champion

Explorer

hello

 

 

yes, i made that in impala

 

[localhost:21000] > invalidate metadata hbase_capacite;
Query: invalidate metadata hbase_capacite

Fetched 0 row(s) in 0.08s

Champion

Explorer

i ve created a hive table like that :

 

DROP TABLE IF EXISTS hbase_capacite;
   
CREATE EXTERNAL TABLE IF NOT EXISTS hbase_capacite (row_dy  string, yearcap int, depcap int, calcap double)
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" =    ":key,capacite_data:yearcap,capacite_data:depcap,capacite_data:calcap")
TBLPROPERTIES("hbase.table.name" = "capacite");

 

 

Explorer

[localhost:21000] > invalidate metadata hbase_capacite;
Query: invalidate metadata hbase_capacite

Fetched 0 row(s) in 0.08s