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.

how to import data from oracle using sqoop1 client from hue

how to import data from oracle using sqoop1 client from hue

New Contributor

Hi All,

We am using cloudera CDH6.3 and we are trying to fetch data from external oracle database using sqoop1 client in hue.
we are getting an error "Could not load db driver class: oracle.jdbc.OracleDriver". but we have placed the ojdbc7.jar file in the below path and provided necessary previleges.
path: /var/lib/sqoop
we are able to run the sqoop job from putty but the same is not working from hue sqoop1 client.
Can anyone help me please.

4 REPLIES 4
Highlighted

Re: how to import data from oracle using sqoop1 client from hue

Rising Star

@Mohan50 

 

Have you configured oozie libpath in the workflow? If not, please add the ojdbc7.jar under /user/oozie/share/lib/ in HDFS and retry execution.

 

Hope this helps,

Paras

Was your question answered? Make sure to mark the answer as the accepted solution.
If you find a reply useful, say thanks by clicking on the thumbs up button.

 

 

 

Highlighted

Re: how to import data from oracle using sqoop1 client from hue

New Contributor

Thanks for your response.
I have placed ojdbc7.jar file in /var/lib/sqoop path earlier and it worked from putty. Similarly, I have placed the same jar file with full permission into /var/lib/oozie path. But it didn't help me.
still i am getting error "Could not load db driver class: oracle.jdbc.OracleDriver"

 

Highlighted

Re: how to import data from oracle using sqoop1 client from hue

Rising Star

@Mohan50 

 

This should be the oozie sharelib path on HDFS. Default path: /user/oozie/share/lib/ in HDFS

You can check the same under oozie configuration on cloudera manager.

Highlighted

Re: how to import data from oracle using sqoop1 client from hue

New Contributor

Thanks for helping on sqoop through sqoop client1

As advised, I have placed the ojdbc7.jar file in oozie shared (HDFS) path. We are using below query to import data.
sqoop import --connect jdbc:oracle:thin:@a.b.c.d:pqr:xyz --username USER --password XXXX --table ACCOUNT --target-dir /user/hive/warehouse/user.db/ACCOUNT --m 1
Now the observation is that job is not getting ended. It keep on running. Further I checked the data is loaded into HDFS file system.
It proves that connection has been established and data imported but table is not imported (DDL).

Don't have an account?
Coming from Hortonworks? Activate your account here