Load Data into Autonomous Database from Oracle Cloud Infrastructure Object Storage
This example shows you how to load data from Oracle Cloud Infrastructure Object Storage to Autonomous Database using SQL commands.
You have various options to perform data loading into Autonomous Database, such as:
-
Using UI options: You can use the Data Studio Load tool user interface to create credentials for the cloud store location, select files containing data, and run data load jobs.
-
Using Rest Data Services APIs: You can use the Data Studio Load tool APIs to create links to the cloud store location and run data load jobs.
-
Using SQL commands as explained in this example.
All these methods use the
same PL/SQL package DBMS_CLOUD
for loading data.
However, Data Studio provides additional benefits over SQL commands.
It not only helps to analyze the source and create table definitions
but also performs validation checks.
You require Oracle Cloud Infrastructure access credentials for user account authentication and an object URL for accessing the object in your Oracle Cloud Infrastructure Object Storage bucket.
-
Create credentials for Oracle Cloud Infrastructure user account in the Autonomous Database.
-
Copy data from Oracle Cloud Infrastructure Object Storage to the database.
Topics
- Prepare for Loading Data from Oracle Cloud Infrastructure
Verify the prerequisites and prepare for loading data from Oracle Cloud Infrastructure Object Storage. - Steps for Loading Data from Oracle Cloud Infrastructure
Run these steps to load data from Oracle Cloud Infrastructure Object Storage to Autonomous Database.
Parent topic: Examples for Loading Data into Autonomous Database
Prepare for Loading Data from Oracle Cloud Infrastructure
Verify the prerequisites and prepare for loading data from Oracle Cloud Infrastructure Object Storage.
Prerequisites
oci-data.txt
exists in the Oracle Cloud
Infrastructure bucket that you
can import. The sample file in this example has the following
contents:1,OCI Direct Sales
2,OCI Tele Sales
3,OCI Catalog
4,OCI Internet
5,OCI Partners
On the Oracle Cloud Infrastructure side, log in to your Oracle Cloud Infrastructure account and do the following:
Steps for Loading Data from Oracle Cloud Infrastructure
Run these steps to load data from Oracle Cloud Infrastructure Object Storage to Autonomous Database.
SELECT * FROM myocitable;
ID NAME
-- –-------------
1 OCI Direct Sales
2 OCI Tele Sales
3 OCI Catalog
4 OCI Internet
5 OCI Partners
For more information about loading data, see Load Data from Files in the Cloud.