Reputation: 1
I have installed hadoop 2.7.2, while trying to import data into hive tables using below sqoop command, why it is trying to insert into /user/root/
instead of inserting into /user/hive/warehouse
sqoop import-all-tables \
--num-mappers 1 \
--connect "jdbc:mysql://localhost:3306/retail_db" \
--username=root \
--password=root \
--hive-import \
--hive-overwrite \
--hive-database sqoop_import \
--create-hive-table
Upvotes: 0
Views: 973
Reputation: 13773
Sqoop hive import will import data into HDFS first and then LOAD data into hive table.
In your case, your RDBMS table first migrated to /user/root/<table-name>
and then loaded into Hive.
You can adjust the parent directory of the import with the --warehouse-dir
argument. If you don't want your data to move to /user/root/
. Use:
--warehouse-dir <dir> HDFS parent for table destination
in your sqoop import command.
Upvotes: 2