Streaming export: include data before and after for update/delete

Author: danthegoodman1Created Jan 14, 2026Updated Sep 19, 2026

When a document is deleted, it would be great if the row data can be included.

The use case: We build materialized views off document deltas for things like counting documents with certain properties (without having to maintain those counts via triggers that cause OCC conflicts, sharded counters, or aggregate component).

When the document is deleted, since we don't have the data anymore, we have no idea which to decrement from.

Most CDC systems typically include before and after pairs anyway, so the same would go for updates, maybe include the row before the update with a special _before property which could also store the row before deletion.

Source: get-convex/convex-backend