CDC Header Attributes

The Oracle CDC Client origin always provides the following CDC record header attributes for each record:
  • oracle.cdc.sequence.oracle - Includes sequence numbers that indicate the order in which statements were processed within the transaction.
    This sequence number is generated by Oracle. Use to keep statements in order within a single transaction.
    Note: When the origin uses local buffering, Oracle provides the default value of 1 for all records, so should not be used to order statements. Use the oracle.cdc.sequence.internal attribute when using local buffering.
  • oracle.cdc.sequence.internal - Includes sequence numbers equivalent to those in the oracle.cdc.sequence.oracle attribute, but created by the Oracle CDC Client origin.

    Like the oracle.cdc.sequence.oracle attribute, you can use these values to keep statements in order within a single transaction.

    Best practice is to use this attribute only when using local buffering, when the oracle.cdc.sequence.oracle attribute does not provide the expected data.

When the Oracle CDC Client origin is configured to parse the SQL query, the origin also provides the following CDC record header attributes for each record:
  • oracle.cdc.operation
  • oracle.cdc.precisionTimestamp - Timestamp, to the nanosecond, when the database change occurred.

    Used when the database provides the timestamp in nanoseconds.

  • oracle.cdc.query
  • oracle.cdc.redoValue
  • oracle.cdc.rowId
  • oracle.cdc.scn
  • oracle.cdc.table
  • oracle.cdc.timestamp - Timestamp, to the second, when the change occurred.

    Used when the database provides the timestamp in seconds.

  • oracle.cdc.undoValue
  • oracle.cdc.user
When parsing the SQL query, the origin also includes the following record header attributes for each decimal field in the record:
  • jdbc.<fieldname>.precision
  • jdbc.<fieldname>.scale

You can use the record:attribute or record:attributeOrDefault functions to access the information in the attributes. For more information about working with record header attributes, see Working with Header Attributes.