0

I have imported all tables using sqoop into a Hive database "sqoop_import" able to see all tables imported successfully as below :-

hive> use sqoop_import;
OK
Time taken: 0.026 seconds
hive> show tables;
OK
categories
customers
departments
order_items
orders
products
Time taken: 0.025 seconds, Fetched: 6 row(s)
hive> 

But when I am trying the same from impala-shell or Hue using the same user, It's showing different results as below : -

[quickstart.cloudera:21000] > use sqoop_import;
Query: use sqoop_import
[quickstart.cloudera:21000] > show tables;
Query: show tables
+--------------+
| name         |
+--------------+
| customers    |
| customers_nk |
+--------------+
Fetched 2 row(s) in 0.01s
[quickstart.cloudera:21000] > 

What am I doing wrong?

Vamsi Prabhala
  • 48,685
  • 4
  • 36
  • 58
Chandan
  • 1
  • 2
  • 2
    Possible duplicate of [Impala can't access all hive table](https://stackoverflow.com/questions/20500221/impala-cant-access-all-hive-table) – tk421 Jul 22 '18 at 22:30

1 Answers1

2

When you import a new table with sqoop to hive, in order to see it through Impala-Shell you should INVALIDATE METADATA of the specific table. So from the Impala-Shell run the following command : impala-shell -d DB_NAME -q "INVALIDATE METADATA table_name"; .

But if you append new data files to an existing table through sqoop you need to do REFRESH. So from the Impala-Shell run the following command: impala-shell -d DB_NAME -q "REFRESH table_name";.

eMazarakis
  • 122
  • 1
  • 13