Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to see tables in Impala - ingest and query relational data tutorial

Unable to see tables in Impala - ingest and query relational data tutorial

New Contributor

I was following the 'Ingest and query relational data' tutorial on CDH 5.5. I tried executing this command:

sqoop import-all-tables \
    -m 1 \
    --connect jdbc:mysql://quickstart:3306/retail_db \
    --username=retail_dba \
    --password=cloudera \
    --compression-codec=snappy \
    --as-parquetfile \
    --hive-overwrite \
    --warehouse-dir=/user/hive

 

I get the message that the job is successful. But I am not able to see the tables in Impala browser. I can even see all the files created under the /user/hive/workspace. But I am not able to see the table.

 

Thanks in advance for the help!

5 REPLIES 5

Re: Unable to see tables in Impala - ingest and query relational data tutorial

Master Collaborator
Are you perhaps forgetting to issue the 'invalidate metadata;' command in
Impala? See if the tables show up in the Hive Query Editor. They share
metadata, but Hive does not cache metadata, so that'll help narrow down the
problem.

Re: Unable to see tables in Impala - ingest and query relational data tutorial

Explorer

Hi,

I also tried to acces the dataset for the following schema


http://www.cloudera.com/content/www/en-us/developers/get-started-with-hadoop-tutorial/exercise-1.htm...

 

 

I also tried  "invalidate metadata <tablename>" but it didn't find any table.

I am running cloudera quick start VM 5.5

Re: Unable to see tables in Impala - ingest and query relational data tutorial

New Contributor

I tried refreshing the tables. It does not help. I cannot see the tables in Hive too.

Re: Unable to see tables in Impala - ingest and query relational data tutorial

New Contributor

Just need to add --hive-import  to the end of your script/commands

5-24-2017 1-12-49 PM.png

then in Imapa just run :

 

invalidate metadata;

show tables;

work for me :) 

Re: Unable to see tables in Impala - ingest and query relational data tutorial

Explorer

Dear @adz 

If you want to manipulate the table through Impala-Shell then you only need to run the following command from a pc where Impala is installed.

impala-shell -d db_name -q "INVALIDATE METADATA tablename";

 

You have to do INVALIDATE because your table is new for Impala daemon metadata. 

 

Then if you append new data-files to the existing tablename table you only need to do refesh, the command is 

impala-shell -d db_name -q "REFRESH tablename";

Refresh due to the fact that you do not want the whole metadata for the specific table, only the block location for the new data-files.

 

So after that you can quey the table through Impala-shell and Impala query editor.