简体   繁体   中英

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

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

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

More on Hive import here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM