MAP for Extract
Valid For
Extract
Description
You can also use MAP
in an Extract
parameter file to change the name of the transactions that Oracle GoldenGate stores
for the table.
For example, consider that you capture the table scott.emp
. For the
first use case, you capture it to apply all the changes to anther table called
scott.emp
with the same structure, but you also want to capture
scott.emp
with a different set of columns and replicate that to
a table called scott.emp_old
. To make this work, you'll need an
Extract parameter file similar to this:
TABLE scott.emp;
MAP scott.emp,
cols(emp_no, employee_name),
target scott.emp_old;
In the Replicat, you can do the following:
MAP *.*, target *.*;
And the changes from scott.emp
would go into
scott.emp
, the trail data for scott.emp_old
would go into scott.emp_old
.
Use the MAP
parameter for Extract when Extract is operating in classic capture mode and you need to use the ALTID
component of this parameter to map an object ID to an object name. ALTID
specifies the correct object ID if Extract is capturing from Oracle transaction logs that were generated by a database other than the one to which Extract is connected. This configuration is required when Extract is not permitted to connect directly to the production (source) database to capture production transactions.
When Extract cannot connect directly to a source database, it connects to a live standby or other facsimile database, but it reads transaction logs that are sent from the source database. By querying the catalog of the alternate database, Extract can get the metadata that it needs to expand the transaction data into valid SQL statements, but it cannot use the object ID from this query. The local object ID for a table is different from the object ID of that table in the source database (and, thus, in the transaction log). You must manually map each table name to the source object ID by using a MAP
statement with ALTID
.
To Use MAP with ALTID
-
Create one
MAP
statement withALTID
for each table that you want to capture. Wildcarded table names are not allowed for aMAP
parameter that containsALTID
. -
To specify other processing for the same table (or tables), such as data filtering or manipulation, you must also create a
TABLE
statement for each of those tables. Wildcarding can be used to specify multiple tables with oneTABLE
statement, if appropriate. -
Use a regular Replicat
MAP
statement in the Replicat parameter file, as usual.MAP
for Extract does not substitute forMAP
for Replicat, which is required to map source tables to target tables. -
DDL capture and replication is not supported when using
ALTID
.
Default
None
Syntax
MAP [container.]schema.
table, ALTID object_ID [, object_ID]