Adding custom fields for a replicated record using tokens

In this recipe we will look at how we use GoldenGate tokens to add additional information to an extracted record and map it to the table in the target environment.

Getting ready

For this recipe, we will use the following CUST table. This table is created in the source and target databases under the SCOTT schema. In the target database, the table has an additional column to denote the name of the source database from which this change originated.

Source CUST Table

Target CUST Table

CUST_ID

CUST_ID

ACCOUNT_ID

ACCOUNT_ID

CUST_NAME

CUST_NAME

BALANCE

BALANCE

 

CHANGE_ORIGIN

How to do it...

Steps to be performed in the source environment are as follows:

  1. Create an Extract process parameter ...

Get Oracle GoldenGate 11g Complete Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.