We are using CDC on some scylladb tables to capture the operations that take place.
A doubt arose regarding the log of delete operations, is it possible to configure so that delete operations fill all columns with data from before deletion? Currently only primary key columns are populated with information in the CDC log table
The docs says that you can configure CDC to receive the previous values like: CREATE TABLE ks.t (pk int, ck int, v1 int, v2 map<int, int>, PRIMARY KEY (pk, ck)) WITH cdc = {āenabledā: true, āpreimageā: āfullā};
However: "Preimage rows are only created for rows modified using inserts, updates, or row deletes. They are not created for range deletes or partition deletes. "
as Dor said - you can try enabling preimages, which will show you the state of the row from before the deletion (but preimages donāt appear for range/partition deletions).
Note however that preimages/postimages have downsides which you should consider before enabling them:
they incur additional performance penalty, as they require a read-before-write and they appear as an additional row in the CDC log table in addition to the ādeltaā row,
If you use only delta rows (which appear when you enable CDC without any additional options such as āpreimageā), you wonāt get previous data; youāll only get the applied difference (ādeltaā) which, in case of deletions, is described by the primary key and cdc$operation column with the appropriate value.