Forum Stats

  • 3,853,846 Users
  • 2,264,287 Discussions
  • 7,905,475 Comments

Discussions

Writing Deleted records to separate tables or adding an audit column in target table

User_RNDR7
User_RNDR7 Member Posts: 2 Red Ribbon
edited Jun 27, 2022 2:54PM in GoldenGate

Hi,

What is the best practice to capture deleted records when replicating using GoldenGate.


  • Using an audit column in the target and using INSERTDELETES with sysdate/default value for the audit column
INSERTDELETES
MAP sogg.sample_data_1, TARGET stgg.sample_data_1, &
COLMAP (USEDEFAULTS, DATE_DELETED = @DATENOW())
  • Inserting deleted records to a separate table and using ALLOWDUPTARGETMAP parameter
IGNOREINSERTS
IGNOREUPDATES
INSERTDELETES
MAP sogg.sample_data_1, TARGET stgg.sample_data_1_deleted


Thanks !

Tagged:

Answers