Striim 4.0.5 documentation

PostgreSQL Reader WAEvent fields

The output data type for PostgreSQLReader is WAEvent. The elements are:

metadata: a map including:

  • LSN: log sequence number of the transaction's commit

  • NEXT_LSN: next log sequence number (used for reconnecting to the replication slot after a non-fatal network interruption)

  • OperationName: INSERT, UPDATE, or DELETE

    When schema evolution is enabled, OperationName for DDL events will be Alter, AlterColumns, Create, or Drop. This metadata is reserved for internal use by Striim and subject to change, so should not be used in CQs, open processors, or custom Java functions.

  • PK_UPDATE: included only when an UPDATE changes the primary key

  • Sequence: incremented for each operation within a transaction

  • TableName: the name of the table including its schema

  • TimeStamp: timestamp from the replication subscription

  • TxnID: transaction identifier

To retrieve the values for these fields, use the META() function. See Parsing the fields of WAEvent for CDC readers.

data: an array of fields, numbered from 0, containing:

  • for an INSERT operation, the values that were inserted

  • for an UPDATE, the values after the operation was completed

  • for a DELETE, the value of the primary key and nulls for the other fields

To retrieve the values for these fields, use SELECT ... (DATA[]). See Parsing the fields of WAEvent for CDC readers.

before: for UPDATE operations, contains the primary key value from before the update. When an update changes the primary key value, you may retrieve the previous value using the BEFORE() function.

dataPresenceBitMap, beforePresenceBitMap, and typeUUID are reserved and should be ignored.