Get change data values driven by a source table row
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
When the table Policy defines Change tracking as Level 2 or Level 3, 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:
|
However, if the table has horizontal partitioning enabled and the CDC policy specifies Change tracking as Level 0 or Level 1, the change table record is unavailable. To achieve the same result as when the change table record is available, use the source table directly.
Step 1 on the CDC tables retrieves the source table number. By searching for an active CDC table policy for the source table, this step determines whether change tracking is active.
|
Step 2 uses a query that returns a set of change values for each source table row R, whose
pro_partn_rowid matches the value returned by the
pro_get_partn_rowid scalar function. pro_get_partn_rowid
generates a base64 SQL representation of the row's record ID and partition ID
using _cdc-change-tracking._Recid and
_cdc-change-tracking._Partition-Id, respectively, and compares the result
to the pro_partn_rowid from the partitioned source table.
|