A quick demo for viewing changes on a table with CDC enabled. You’ll see how the changes are represented in a ScyllaDB CDC log table.
So let’s quickly look at how it works in practice
So we will create a new table that will have the CDC enabled, you can also enable it on any
existing table. So now we have created a table that has a very simple schema but
it has CDC enabled using the. WITH cdc = {‘enabled’: true}
The table is now visible
but moreover, a new table was created the. ScyllaDB CDC log table, which has a bit more
complicated schema and now if we insert some data to the base table, to the CDC example table
It’s visible in this table and it’s also visible in the log message so
here’s the value of the row we have just inserted and as you can see there’s a time view ID so you
can have a timestamp of when this row was inserted and moreover, suppose we executed an update command
Now if we look at this table we have only a single row, because we have updated an existing row but
there’s no information about all operations that have changed to this row, however the CDC log
contains all operations, so you can work out all operations that have changed this particular row
So that was a very, very quick introduction to ScyllaDB CDC, we have created this
table with CDC enabled, we have looked at how changes are represented in a ScyllaDB CDC log
and for more information, I highly recommend the “best practices for change data capturing ScyllaDB” talk
that was presented by Calle, there’s a lot of information that I think you will find helpful