Description of MAP Statement
The following describes the MAP
statement:
-
Per
COMPARECOLS
, use the before image of all columns in the trail record in the ReplicatWHERE
clause for updates and deletes. -
Per
DEFAULT
, use all columns as the column group for all conflict types; thus the resolution applies to all columns. -
For an
INSERTROWEXISTS
conflict, use theUSEMAX
resolution: If the row exists during an insert, use thelast_mod_time
column as the resolution column for deciding which is the greater value: the value in the trail or the one in the database. If the value in the trail is greater, apply the record but change the insert to an update. If the database value is higher, ignore the record. -
For an
UPDATEROWEXISTS
conflict, use theUSEMAX
resolution: If the row exists during an update, use thelast_mod_time
column as the resolution column: If the value in the trail is greater, apply the update. -
If you use
USEMIN
orUSEMAX
, and the values are exactly the same, thenRESOLVECONFLICT
isn't triggered and the incoming row is ignored. If you useUSEMINEQ
orUSEMAXEQ
, and the values are exactly the same, then the resolution is triggered. -
For a
DELETEROWEXISTS
conflict, use theOVERWRITE
resolution: If the row exists during a delete operation, apply the delete. -
For an
UPDATEROWMISSING
conflict, use theOVERWRITE
resolution: If the row does not exist during an update, change the update to an insert and apply it. -
For a
DELETROWMISSING
conflict use theDISCARD
resolution: If the row does not exist during a delete operation, discard the trail record.Note:
As an alternative to
USEMAX
, you can use theUSEMAXEQ
resolution to apply a>=
condition. For more information, see Parameters and Functions Reference for Oracle GoldenGate.