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 and can execute SQL statements or PL/SQL stored procedures.
Data lookups
On the target database, the SQLEXEC
parameter in the MAP
statement allows external calls to be made through a SQL interface that supports the execution of native SQL and PL/SQL stored procedures. This option is typically invoked to perform database lookups, thus obtaining data required to resolve a mapping and can only be executed by the GoldenGate (GGADMIN
) database user.
Executing stored procedures
The following code maps data from the CREDITCARD_ACCOUNT
table to the NEW_ACCOUNT
table. The Extract process executes the LOOKUP_ACCOUNT
stored procedure prior to executing the column map. This stored procedure has two parameters: IN
and OUT
. The...