talha06
talha06

Reputation: 6466

Hive - No table is listing after successful Sqoop import

After successful import into Hive using Sqoop, I can't see the recently imported table in Hive.

import command

./sqoop import --connect jdbc:mysql://localhost:3306/extedu --table user --username TALHA -P --warehouse-dir /home/talha/warehouse --direct

Hive Tables

hive> show tables;
OK
Time taken: 0.038 seconds

Upvotes: 0

Views: 943

Answers (2)

Abhijeet Gaikwad
Abhijeet Gaikwad

Reputation: 71

Your command should contain "--hive-import" option.

More on Hive import here.

Upvotes: 0

Sourav Gulati
Sourav Gulati

Reputation: 1359

This is a common issue with Hive, set following property in hive-site.xml

<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:derby:;databaseName=metastore_db;create=true</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>

instead of metastore-db, give some absolute path such as

<property>
  <name>javax.jdo.option.ConnectionURL</name>
  <value>jdbc:derby:;databaseName=**/home/user/hive/metastore_db**;create=true</value>
  <description>JDBC connect string for a JDBC metastore</description>
</property>

Then check. Hopefully it will work

Upvotes: 2

Related Questions