A Simple Guide to Connect OCI Data Science with ADB



OCI Data Science is a fully managed service for data science team to build, train and manage machine learning models in Oracle Cloud Infrastructure. It can be integrated with other OCI stack such as ADB, Functions, Data Flow and Object Storage. In this guide we will see how to connect OCI Data Science with ADB.

High Level Process

  1. Launch a notebook session
  2. Download and Configure Oracle Client
  3. Upload ADW wallet file.
  4. Import library and connect to ADB

Launch a notebook session

If you want to know how to launch a Notebook Session in OCI Data Science, please refer to here. If you want to know how to launch a Notebook Session in OCI Data Science, please refer to here.

OCI Data Science allow the data science team to build and train machine learning model in Python language using Jupyter Lab interface.


Download and Configure Oracle Client

Launch a terminal and download Oracle client as shown below.

Run the following command to download Oracle Client.

wget https://download.oracle.com/otn_software/linux/instantclient/199000/instantclient-basic-linux.x64-

Next, click on the upload icon to upload ADB wallet.

Unzip the instant client.

Move the wallet into instantclient_19_9/network/admin and unzip it.

Now, let’s update the sqlnet.ora content to point to the location where you have unzip the ADB wallet.

Import Library and Connect to ADB

Now that you have everything that is needed to connect your datascience notebook with ADW. Let’s launch a notebook session and import necessary library and start connecting to ADW.

import cx_Oracle as cx
import pandas as pd
import os
import warnings as w

con = cx.connect(“ADMIN”,”WElcome12345#_”,”samadw_high”)

data = pd.read_sql(query, con=con)


This is the screenshot of running above python code.




OCI data science uses an open source tools which provide familiarity and productivity for data scientists. The above example of creating connection to ADB is just a simple guide to help data scientist to kick start your machine learning development by connecting into 1 of our database platforms to gain access to data. 

Learn More

Click here to learn more about data science.

Click here to have some hands-on tutorial on OCI Data Science.

Read More …


Write a comment