Load Data into Autonomous Database from Google Cloud Storage
This example shows how to load data from Google Cloud Storage to Autonomous Database.
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 Google Cloud Platform (GCP) access credentials for user account authentication and an object URL for accessing the object in Google Cloud Storage bucket.
-
Create credentials for GCP user account in the Autonomous Database.
-
Copy data from the Google Cloud Storage bucket to the database.
Topics
- Prepare for Loading Data from Google Cloud Storage
Verify the prerequisites and prepare for loading data from Google Cloud Storage. - Steps for Loading Data from Google Cloud Storage
Run these steps to load data from Google Cloud Storage to Autonomous Database.
Parent topic: Examples for Loading Data into Autonomous Database
Prepare for Loading Data from Google Cloud Storage
Verify the prerequisites and prepare for loading data from Google Cloud Storage.
Prerequisites
gcp-data.txt
exists in the Google Cloud Storage bucket that you can import. The
sample file in this example has the following
contents:1,GCP Direct Sales
2,GCP Tele Sales
3,GCP Catalog
4,GCP Internet
5,GCP Partners
On the Google side, log in to your Google Cloud Platform (GCP) account and do the following:
Steps for Loading Data from Google Cloud Storage
Run these steps to load data from Google Cloud Storage to Autonomous Database.
SELECT * FROM mygoogletable;
ID NAME
-- –-------------
1 GCP Direct Sales
2 GCP Tele Sales
3 GCP Catalog
4 GCP Internet
5 GCP Partners
For more information about loading data, see Load Data from Files in the Cloud.