Get change data values driven by a source table row
- Last Updated: January 17, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
When the table Policy defines change tracking as Level 0 or Level 1, the Change table contains change values as determined by the CDC table and Field policy selected by the user. In this use case, the application is looking for any possible changes for an identified source table row R. The application identifies the source table row R using application-specific criteria. Any changes that exist for that specific source table row R are found in the CDC tables, and then handled for row R. This is done in 3 steps.
In Step 1, the source table row R is identified using the RowID of row R. In this step, the details that are fetched are the RowID(RecID) and any partition ID of the source table row R. The partition ID information is needed if the source table is either Multi-tenant or if it is table Partitioned.
|
Step 2 on the CDC tables gets the source table number. It verifies whether Change tracking is active for source table by checking for an active CDC table Policy for the source table.
|
Step 3 uses a query which gives a Result Set of the set of change values for each source table row R from the preliminary query, in change sequence order.
|
These changes could be Insert, Delete, or Update operations and the application logic can decide how to transfer each change to the Data Warehouse. Step 1 and Step 2 of the query can be embedded inside an application in nested loops as shown in the following table:
|