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.

problem with HIVE

problem with HIVE

New Contributor

 

Hello everyone,

 

i am new to this forum i wish i can get the answer for my question 

 

i sqoop the tables from mysql to HIVE under this path 

/user/hive/warehouse/retail_db.db. tables are created under retail_db database , i am able to see these.

 

using Hive shell , i entered the command show tables 

 but i dont see these tables 

can any one help me with this 

 

 

thanks 

3 REPLIES 3

Re: problem with HIVE

New Contributor

Try switching databases before asking for the tables list.

 

"use <databasename>;"

"show tables;"

 

My guess is that you are connected to the default database "default" and the "show tables;" command list the tables of that database and not yours.

 

regards,

Mathieu

Re: problem with HIVE

New Contributor
i use the database name i ran show tables; command but no luck
Highlighted

Re: problem with HIVE

Champion
Did you use the sqoop switches to move it into HDFS at that location or did you tell it to move it into hive, specific db, table, and schema mapping (if needed)?

My suspicion is that you just imported the data into the Hive warehouse directory in HDFS. Without the schema nothing will show up in Hive. You can create this manually now, no need to do it through sqoop since the data is already there.
Don't have an account?
Coming from Hortonworks? Activate your account here