Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Sqoop Import triggering error

avatar
Rising Star
when i am trying to run the sqoop import command i am getting the below error.

6112-sqoop-import-error.png

Thanks,
Ravikumar.
1 ACCEPTED SOLUTION

avatar
@Ravikumar Kumashi Please try including the below option in the sqoop import command and let us know the results.
--driver com.mysql.jdbc.Driver

View solution in original post

6 REPLIES 6

avatar
@Ravikumar Kumashi Please try including the below option in the sqoop import command and let us know the results.
--driver com.mysql.jdbc.Driver

avatar
Rising Star

@slachterman Thanks it worked now!!! where can i find that data in HDFS if no path is specified ?

So It has to be changed if i am importing from oracle/postgresql ?

avatar

@Ravikumar Kumashi please see these docs. By default, Sqoop will import a table named foo to a directory named foo inside your home directory in HDFS. For example, if your username is someuser, then the import tool will write to /user/someuser/foo/(files). You can adjust the parent directory of the import with the--warehouse-dir argument. For example:

$ sqoop import --connnect <connect-str> --table foo --warehouse-dir /shared \
You can also explicitly choose the target directory, like so:
$ sqoop import --connnect <connect-str> --table foo --target-dir /dest \

avatar
Rising Star

@slachterman Understood, Thanks for the detailed explaination!!!

What if i have to re import again and output directory already exist, is there options for sqoop import with overwrite option?

avatar

@Ravikumar Kumashi please see the --delete-target-dir option for sqoop import.

avatar
Rising Star

@slachterman Thank you!!!