r/dataengineering • • 2d ago

Help Delete in DV 2.0

I'm building DV 2.0 from scratch and I have issue understanding how to mark hub entry as deleted.

  1. In methodology, there is STS (Status Tracking Satellite) that captures CDC events
  2. There is load_end_date column in any satellite. (Satellites can be append-only or can be with load_date ... load_end_date - I've picked the latter approach)

Should I change load_end_date from marker date to actual deletion event timestamp in all satellites attached to that hub or insert new entry in STS only?

3 Upvotes

2 comments sorted by

1

u/quiet_stacktrace 14h ago

i'd go sts only. the hub stays insert-only and a delete is just a new fact about the key, so add an sts row with a deleted status and the cdc event timestamp instead of touching the satellites. downstream you read the latest sts row to know if the key is gone, and load_end_date stays just for closing satellite versions.

1

u/kotpeter 14h ago

I have no idea of DV 2.0, but I'd do it the following way:

  • Have an is_deleted boolean column in the hub to track current state and avoid redundant joins down the line
  • Use a separate satellite for cdc history deep dive when needed.