Replicate data from Autonomous
Transaction Processing to Databricks
This quickstart demonstrates how to replicate data from Autonomous
Transaction Processing to Databricks using OCI
GoldenGate.
Environment set up: Autonomous Transaction Processing 🔗
If you don't already have a source database set up for replication, you
can follow these steps to load a sample schema to use for this quickstart. This
quickstart uses Autonomous Transaction Processing for the source database.
In the Oracle Cloud console, select your Autonomous Transaction Processing (ATP) instance from
the Autonomous Databases page to view its details and access Database
Actions.
Unlock the GGADMIN user:
Click Database actions, then click Database
Users.
Locate GGADMIN and then click its ellipsis menu (three dots) and select
Edit.
In the Edit User panel, enter the GGADMIN password, confirm the
password, and then deselect Account is Locked.
Click Apply Changes.
Load the source sample schema and data:
From the Database actions menu, under Development, select
SQL.
Copy and paste the script from
OCIGGLL_OCIGGS_SETUP_USERS_ATP.sql into the SQL
worksheet.
Click Run Script. The Script Output tab displays confirmation
messages.
Clear the SQL worksheet and then copy and paste the SQL script from
OCIGGLL_OCIGGS_SRC_USER_SEED_DATA.sql.
Tip:
You may need to run each statement separately for the
SQL tool to execute the scripts successfully.
To verify that the tables were created successfully, close the SQL
window and reopen it again. In the Navigator tab, look for the
SRC_OCIGGLL schema and then select tables from
their respective dropdowns.
Enable supplemental logging:
Clear the SQL Worksheet.
Enter the following statement, and then click Run
Statement:
ALTER PLUGGABLE DATABASE ADD SUPPLEMENTAL LOG DATA;
Before you begin 🔗
To successfully complete this quickstart, you must have the following:
A source Autonomous Transaction Processing instance
Provide target ADLS container name in
gg.eventhandler.abs.bucketMappingTemplate.
Add
gg.handler.databricks.fileRollInterval=5s.
Click Create and Run.
You return to the Overview page, where you can review the Replicat details.
Task 5: Verify the
replication 🔗
Perform some updates to the source Autonomous Transaction Processing
instance to verify replication to Databricks.
In the Oracle Cloud console, open the navigation menu, select Oracle
Database, and then select Autonomous Transaction
Processing.
In the list of Autonomous Transaction Processing instances, select your source instance
to view its details.
On the database details page, click Database actions.
Note
You should be automatically logged
in. If not, log in with the database credentials.
On the Database actions home page, select SQL.
Enter the following into the worksheet and click Run
Script.
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1001,0,'Brendt','Paul','10 Jasper Blvd.',107,'(212) 555 2146',19,10);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1002,0,'McCarthy','Robin','27 Pasadena Drive',11,'(214) 555 3075',29,11);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1003,0,'Travis','Peter','7835 Hartford Drive',12,'(510) 555 4448',34,12);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1004,0,'Larson','Joe','87 Carmel Blvd.',13,'(213) 555 5095',45,13);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1005,0,'Goldschmidt','Tony','91 Torre drive',14,'(619) 555 6529',55,20);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1006,0,'Baker','William','2890 Grant Avenue',15,'(312) 555 7040',64,21);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values ((1007,0,'Swenson','Jack','64 Imagination Drive',19,'(202) 555 8125',74,22);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1008,0,'Brendt','Paul','10 Jasper Blvd.',107,'(212) 555 2146',19,10);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1009,0,'McCarthy','Robin','27 Pasadena Drive',11,'(214) 555 3075',29,11);
Insert into SRC_OCIGGLL.SRC_CUSTOMER (CUSTID,DEAR,LAST_NAME,FIRST_NAME,ADDRESS,CITY_ID,PHONE,AGE,SALES_PERS_ID) values (1010,0,'Travis','Peter','7835 Hartford Drive',12,'(510) 555 4448',34,12);
In the source ATP deployment console, select the
Extract name, and then click Statistics. Verify
that SRC_OCIGGLL.SRC_CUSTOMER has 10 inserts.
In the target Big Data OCI GoldenGate deployment console, select the Replicat name, and then click Statistics. Verify
that SRC_OCIGGLL.SRC_CUSTOMER has 10 inserts.