Skip to main content
GuideServerConfigure and deploy Tabsdata servers on your machine.TutorialsConfigure data integration workflows within a running Tabsdata server.Advanced TutorialsBuild end-to-end workflows between two specific systems.API ReferenceCLI ReferenceRelease Notes
Version: 2.0.0

MySQLCdcStreamSrc

class
class MySQLCdcStreamSrc(
tables: list[MySQLTableNameSpec],
start_from: MySQLCdcStartFromSpec,
columns_format: CdcColumnsFormatSpec = 'columns',
flatten_columns: bool = True,
src_cfg: CdcSrcCfgSpec | None = None,
)

Bases: StreamSrc

Categories: source

MySQL CDC stream source for @stream_publisher.

A streaming change-data-capture source: it emits one tableframe-batch per binlog flush across the tracked tables. The decorated @stream_publisher function receives the flushed batch as a list of frames and must NOT declare a ctx parameter.

Parameters

parameter

Qualified schema.table names to track.

parameter
start_fromMySQLCdcStartFromSpec (Literal['head', 'tail'] | GtidPosition | BinlogPosition | TimestampPosition)

Where to begin reading the binlog when no prior offset is persisted -- "head" / "tail" keyword, a GtidPosition, a BinlogPosition or a TimestampPosition.

parameter
columns_formatCdcColumnsFormatSpec (Literal['columns', 'struct', 'map'])

Layout for the new (and old, when present) columns payload on each change row -- "columns" (default), "struct" or "map".

parameter
flatten_columnsbool

When True (default), the new columns are inlined as top-level columns, so the downstream consumer sees an ordinary tabular row and columns_format then only affects the old-columns layout.

parameter
src_cfgCdcSrcCfgSpec | None (Mapping[Literal['mysql.cdc.blocking_timeout_seconds', 'mysql.cdc.logging_level', 'tabsdata.cdc.buffer.max_rows', 'tabsdata.cdc.buffer.max_bytes', 'tabsdata.cdc.buffer.max_secs', 'tabsdata.cdc.trigger.max_rows', 'tabsdata.cdc.trigger.max_bytes', 'tabsdata.cdc.trigger.max_secs', 'tabsdata.cdc.poll_interval_seconds'], Any] | None)

Optional config mapping over the allowed CDC keys only -- buffer / trigger thresholds and polling cadence. The plugin falls back to its built-in defaults for missing keys.