28798
DISCUSSIONS
102179
MEMBERS
3161
ARTICLES
Created 04-09-2016 02:39 PM
environment: standalone mac mini running OS/X el capitan 10.11.2
hive: 1.2.1
sqoop: 1.4.6
hadoop: 2.7.1
hello everyone,
i am attempting to import a database table into hive using sqoop. i see the data files in HDFS, but do not see the new table after running 'show tables' in hive. after i manually give the create table statement (which appears in the output of sqoop --verbose), then i can see the table and select from it.
i have hive configured to use derby as its metastore, using a well-known directory:
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:derby:;databaseName=/var/lib/hive/metastore/metastore_db;create=true</value>
<description>JDBC connect string for a JDBC metastore</description>
</property>
i think the problem is that sqoop cannot interact with the hive metastore. every time i run the sqoop command:
sqoop import --verbose --connect jdbc:mysql://localhost/mylocaldb --username ..... --password ..... --table mytable --hive-import
it leaves a directory called metastore_db in the current directory. so i think the fix is to get sqoop to use the hive metastore, instead of doing whatever it's doing. setting HIVE_CONF_DIR to $HIVE_HOME/conf had no effect.
am i on the right track? how can i get this to work?
many thanks,
d