Blog · 23 November 2026 · 1 min read
Erasing one person from a warehouse designed never to forget
'Delete all my data' sounds simple until you meet raw files, backups and SCD2 history tables. How the deletion workflow finds every copy and proves it is gone.
Project: GDPR Deletion Workflow · live dashboard
SCD Type 2 tables exist to keep history forever. GDPR says a person can ask you to forget them. How do you erase one person from a warehouse whose history tables are designed never to forget?
You can run an erasure yourself in the interactive demo: pick a customer, see where their data lives, then press Erase.
Find every identifier first
People change emails and addresses. Their old ones often survive only in SCD2 history. So the workflow starts from a customer ID and collects every identifier the person ever had, including the ones nobody remembers.
Scan everywhere, follow the data map
With that list, it scans raw files, warehouse tables and backups. A data map says what to do with each copy: delete it, or anonymise it. Any copy found that is not in the data map is flagged, because an unknown copy is the real risk.
Anonymise history in place
Deleting rows from an SCD2 table breaks the history for everyone. Instead, the person's versions are anonymised in place: the rows and dates stay, the personal fields do not. dbt then rebuilds everything downstream.
Stop them coming back
Restoring an old backup could bring the person back. Keyed hashes of their identifiers go on a suppression list, and loads check it, so a restore cannot quietly undo an erasure.
Prove it, without keeping the data
The workflow re-scans to confirm nothing is left, then writes a hash-chained audit entry that records what was done and contains no personal data. You can show a regulator the erasure happened without storing who it was.
What I would do differently
I would build the data map as code from the start and fail CI when a new table holding personal data is not in it.
Code: GitHub · Streamlit app