Skill community advanced
CDC Merge Designer
Design a correct upsert/delete merge from a change stream.
Produces a MERGE (or Delta/Iceberg merge) that applies inserts, updates and deletes from a CDC stream correctly, including out-of-order events and tombstones.
npx de-agent-platform add cdc-merge-designer At a glance
| What | Design a correct upsert/delete merge from a change stream. |
|---|---|
| Where | CDC · tech-debezium · tech-delta · tech-iceberg |
Learning objectives
- Order change events deterministically
- Handle deletes (tombstones) without losing history
- Make the merge idempotent under replay
Security scan
Last sweep 2026-10-24: 0 finding(s), 0 marked as examples.
Details
CDC Merge Designer
Ordering
Events arrive out of order. Rank by (lsn, ts_ms) — never by ingestion time.
Deduplicate before merging
Keep the latest event per primary key with a window function, then merge once.
Deletes
A delete is an event with op = 'd'. Two valid choices:
- hard delete on merge, or
- soft delete +
_deleted_at(required if you need history or audit).
Idempotency
Re-running the same micro-batch must produce the same table. Ranking by LSN guarantees this; ranking by arrival time does not.
Registry stats
| Verification | community · Sep 15, 2026 |
|---|---|
| Completeness | 100 |
| Trust multiplier | ×1 |
| Composite | 39.5 · adequate |
| Freshness | 39 days since last source check |
| Difficulty | advanced |
| Version | 0.2.0 |
| License | Apache-2.0 |
| Security flags | 1 |
Did this solve your problem?
CDC Merge Designer