Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Sqoop with oracle

Sqoop with oracle

New Contributor

Command Used in Sqoop: Trying to import the oracle tables in sqoop

sqoop import --connect jdbc:oracle:thin:hud_reader/ hud_reader_n1le@huiprd_nile:1527--username <hud_reader>--password< hud_reader_n1le> --table <DATAAGGRUN> --C:\hadoop\hdp\hadoop-2.7.1.2.4.0.0-169\sqoop_out -m 1 Its giving error message like below, The system cannot find the file specified. Can you please chime any help!!

8 REPLIES 8
Highlighted

Re: Sqoop with oracle

@fnu rasool

Are you haveing HDP on windows ?

Re: Sqoop with oracle

New Contributor

Yes. HDP 2.4 on windows server.

Re: Sqoop with oracle

New Contributor

sqoop.jpg for your reference; thanks

Re: Sqoop with oracle

Why do you need --C:\hadoop\hdp\hadoop-2.7.1.2.4.0.0-169\sqoop_out? It's not preceding any argument. Can you try running without it.

Re: Sqoop with oracle

New Contributor

We are executing the sqoop on HDP 2.4 with windows environment. so it would be DOS prompt only we can execute the sqoop. Not with Linux environment.

Re: Sqoop with oracle

Sure. Your importing a table from Oracle to HDFS, correct? This looks like your trying to import it to a local file system on c:\, which sqoop doesn't do. Also, your path is missing a \ after c: in your attached image. More importantly...The --target-dir argument is for a folder in HDFS. I would try importing into /tmp to see if the statement initially works. Try...

sqoop import --connect jdbc:oracle:thin:hud_reader/hud_reader_n1le@huiprd_nile:1527 --username <hud_reader> --password <hud_reader_n1le> --table <DATAAGGRUN> --target-dir /tmp

Re: Sqoop with oracle

New Contributor

Thank you. I tried with tsqoop1.jpgmp also, but have a same issue. Please find the attachment.

Re: Sqoop with oracle

Super Guru

@Ravi - Looks like incorrect syntax near --targate-dir

Please use below command let us know how it goes:

sqoop import --connect jdbc:oracle:thin:hud_reader/hud_reader_n1le@huiprd_nile:1527 --username <hud_reader> --password < hud_reader_n1le> --table <DATAAGGRUN> --target-dir <target-dir-in-hdfs> -m 1
Don't have an account?
Coming from Hortonworks? Activate your account here