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.

Can anyone please help with the Steps for importing the oracle DB in Apache Atlas to show lineage.

Can anyone please help with the Steps for importing the oracle DB in Apache Atlas to show lineage.

New Contributor

Steps for importing the oracle DB in Atlas to show lineage.

4 REPLIES 4
Highlighted

Re: Can anyone please help with the Steps for importing the oracle DB in Apache Atlas to show lineage.

New Contributor

Vadim Vaks Please help in this if possible. I am able to import hive db but not able to understand how to import oracle DB.

Highlighted

Re: Can anyone please help with the Steps for importing the oracle DB in Apache Atlas to show lineage.

Mentor

@Chanpreet Singh


To run an Oracle import you must have the Oracle driver in the sqoop path. Make sure you also have an entry in the /etc/hosts for the remote Oracle server and the IP should be reachable or hostname resolution should work.

The user executing the import should have the privileges to the undelaying oracle table, you can Login to the Oracle instance on the Sqoop command line as below:

--connect jdbc:oracle:thin:@OracleServer:OraclePort:OracleInstance --username UserName -P 

sqoop will process the below command command in its console output, and then run the MapReduce jobs to bring in the data via the Oracle JDBC driver, the imported data will appaer as a series of “part-m” files, CSV files with one per MapReduce reducer.

$ sqoop import --connect jdbc:oracle:thin:@localhost:1521/orcl --username oracleapps --password oracle1234 --table customer 

By default, sqoop will put the resulting file in your user’s home directory in HDFS e.g /user/sqoop You can also import Oracle and other RDBMS data directly into Hive, with sqoop creating equivalent datatypes for the data coming in (basic datatypes only, none of the advanced spatial and other Oracle ones). For example, I could import the customer table in the orapps schema in like this, directly into an equivalent Hive table:

$ sqoop import --connect jdbc:oracle:thin:@localhost:1521/orcl --username orapps --password oracle1234 --table customer --hive-import< 

Execute from hive CLI

$ hive
hive> desc customer; $ sqoop import --connect jdbc:oracle:thin:@localhost:1521/orcl --username orapps --password oracle1234 --table customer --hive-import --incremental append --check-column Cust_ID 


References:

https://blogs.oracle.com/datawarehousing/data-loading-into-hdfs-part2-data-movement-from-the-oracle-...http://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_data_connector_for_oracle_and_hadoop

http://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_login_to_the_oracle_instance

Highlighted

Re: Can anyone please help with the Steps for importing the oracle DB in Apache Atlas to show lineage.

New Contributor

Thanks Geoffrey Shelton Okot, I am able to create new type in atlas using below command on curl -i -X POST -H, can anyone please help to let me know how can we update the already created type?

Highlighted

Re: Can anyone please help with the Steps for importing the oracle DB in Apache Atlas to show lineage.

Expert Contributor

@Chanpreet Singh

use same api with PUT, it should update the type attributes

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