liveBook · Manning

Cdc stream

As explained in ScyllaDB in Action

A CDC stream is a grouping of changes for a partition that provides an ordered way to read those changes.

A CDC stream groups changes mapped from table partitions and provides their reading order. Multiple partitions can share one stream ID, so query one stream at a time. section 12.1.2

Use CDC streams with these rules:

  • Treat CDC rows as changes over time, not complete row states; reconstruct a row by ingesting its changes. section 12.1.2
  • Expect a partition key to map consistently to one stream ID within a generation, while many partition keys may share that stream. section 12.1.2
  • Account for topology changes by finding the current generation, retrieving its stream IDs, and querying each stream. section 12.1.2

Tracking an author change

After inserting Charlie Change and updating only the bio, the CDC log records an initial row and a later change with name set to null. The log therefore captures changed values rather than the author's final state.

How ScyllaDB in Action covers it

How deep it goes
Explains mappings, generations, topology changes, and three-step stream queries, while stopping short of consumer implementation.
Examples
Uses author insertion and bio-update rows, generated CDC schema, stream mappings, and generation lookup queries.
What it assumes
Assumes familiarity with CDC-enabled tables, partition keys, CQL queries, and ScyllaDB topology changes.
What you can do after
Operate CDC queries by resolving the current generation, retrieving stream IDs, and reading each stream in order.
How it connects
Connects CDC streams to partition keys, stream IDs, CDC generations, topology changes, and CDC tables.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of ScyllaDB in Action. The section links point to the parts of the book it draws on.