The SQLEXEC parameter
Another powerful feature of GoldenGate is the SQLEXEC
parameter. We will discuss when and how to use it as a standalone statement, or in a TABLE
or MAP
statement to fulfill your data transformation requirements. SQLEXEC
is valid for Extract and Replicat processes.
Data lookups
On the target database, the SQLEXEC parameter in a MAP statement allows external calls to be made through an SQL interface that support s the execution of native SQL and PL/SQL stored procedures. This option is typically invoked to perform database lookups to obtain data required to resolve a mapping and can only be executed by the GoldenGate (GGS_ADMIN) database user.
Executing stored procedures
The following example maps data from the CREDITCARD_ACCOUNT
table to NEW_ACCOUNT
table. The Extract process executes the LOOKUP_ACCOUNT
stored procedure prior to executing the column map. This stored procedure has two parameters: an IN and an OUT. The IN parameter accepts an Account Code and is named CODE_IN_PARAM...