Support Questions

Find answers, ask questions, and share your expertise

sqoop import all tables into HDFS

avatar

Hi,

I have 4 tables in Mysql DB, I can able to import single table to HDFS, but when I try to import all 4 tables using below command i am getting error as shown below

sqoop-import-all-tables --connect jdbc:mysql://192.168.0.32:3306/database1 --username hive --password hive --target-dir '/user/tsldp/patelco/' --m 1

11277-error.png

Thanks,

Sagar.

1 ACCEPTED SOLUTION

avatar
Contributor

@sagar pavan, instead of using:

--target-dir '/user/tsldp/patelco/'

try:

--warehouse-dir '/user/tsldp/patelco/'

Each table will then be in a subdirectory under '/user/tsldp/patelco/'

Cheers, Steven.

View solution in original post

2 REPLIES 2

avatar
Contributor

@sagar pavan, instead of using:

--target-dir '/user/tsldp/patelco/'

try:

--warehouse-dir '/user/tsldp/patelco/'

Each table will then be in a subdirectory under '/user/tsldp/patelco/'

Cheers, Steven.

avatar

Thanks Steven for your answer