Skip to main content

cdc_envelope_schema

Function cdc_envelope_schema 

Source
pub fn cdc_envelope_schema(table_schema: &Schema) -> Schema
Expand description

Builds the CDC envelope schema for MySQL CDC records.

The envelope wraps the actual row data with CDC metadata:

  • _table: Source table name
  • _op: Operation type (I/U/D)
  • _ts_ms: Event timestamp
  • _binlog_file: Binlog filename
  • _binlog_pos: Position in binlog
  • _gtid: GTID (if available)
  • _before: Before image (for updates/deletes)
  • _after: After image (for inserts/updates)