Propagate change details to the Data Warehouse, and using CDC_get_changed_columns()
- Last Updated: February 11, 2026
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Propagate change details to the Data Warehouse, and using CDC_get_changed_columns()
This Use Case is applicable when a Data Warehouse (DW) table mirrors, to a significant degree, the source table S, and contains some subset of the columns in S. In this case, the change values to send to DW are driven by detailed examination of each Change table record in a transaction. This use case also shows how the SQL CDC function, CDC_get_changed_columns() can be used to understand and process change Data.
- To get the source table number
- To get the changes from the Change table.
Step 1 is the same as the example in Get change data values for a source table.
fld1, fld2, …, fldnID_f1, ID_f2, ID_f3– identifying fields.
Step 2 gets Change data value from the Change table, in the change sequence order. Changes must be send to the Data Warehouse in the change sequence order so that the Data Warehouse data reflects the corresponding rows in the source table with accuracy.
The following query uses the SQL CDC function, CDC_get_changed_columns(), to get a list of the columns changed on an UPDATE operation. INSERT and DELETE operations always have Change data for every change-tracked field, as well as for Identifying Fields.
|
- Sometimes the data sent to DW contains a small amount of inconsistency due to incomplete transactions. No matter how Change data is selected, time-bounded or not, it is always possible that the selected changes contain incomplete transactions.
- Transaction completion is not written to the Change data.
- As all Change table data is committed, data values are always valid, even if inconsistent with respect to transactions.
- This query retrieves all the tracked fields in the Change table. The fields that do not contain changes, and do not contain Identifying fields, will have the Null value in the Result Set.
- The application learns the names of the columns with changes from an UPDATE from the value of the function CDC_get_changed_columns().
- Insert and Delete operations write all change-tracked column values to the Change table.
- Some ETL applications might want to get only change for certain operations, such as INSERT or DELETE. This can be easily accomplished by adding a Where clause predicate which chooses the desired values of “_Operation” in the Change table.
This query could be embedded within application logic as shown in the following example:
|
The UPDATE statement that is generated for a particular result set row might look like the following example:
|