A user asks to delete all their personal data. Your data is spread across a data lake, warehouse and backups. How do you handle it?
What the interviewer wants to hear
- Know where PII lives using a catalog and lineage
- Delete or anonymise in mutable table formats with row-level deletes
- Vacuum or expire old snapshots so data is physically removed
- Pseudonymisation or crypto-shredding to make deletion easier
- Handle backups with retention policies
- Log and verify completion within the legal deadline
Model answer
First, you need to know where personal data lives, so a catalog with PII tags and lineage is essential. Deletion requests go into a queue with the user ID and a deadline, and a job processes them across systems. In the warehouse, a DELETE or MERGE removes rows. In the lake, plain Parquet files are immutable, so table formats like Delta Lake or Iceberg help: they support row-level deletes, but old snapshots still hold the data until you vacuum or expire them, so that step is mandatory. A good design keeps PII in a few tables keyed by a pseudonymous ID, so most tables never store names or emails. Crypto-shredding goes further: encrypt each user's data with their own key and delete the key. Backups follow a fixed retention, after which deleted data ages out. Every request is logged and verified, and laws like GDPR or India's DPDP Act set the deadlines.
Can you answer it under time pressure?
Take a timed hard round and get scored on every answer.
More hard Data Engineer questions
- Design a data platform for a fast-growing startup with 20 data sources and a small team. What would you choose and why?
- Explain at-most-once, at-least-once and exactly-once processing, and how you achieve effectively-once results in practice.
- How do you choose partitioning and clustering for a very large table? What can go wrong?
- The CEO's revenue dashboard showed wrong numbers for two days before anyone noticed. How do you fix this and prevent it from happening again?
- Design a pipeline that ingests 200,000 clickstream events per second and powers both a real-time dashboard and daily analytics.
- You must migrate a company from an on-premise warehouse to Snowflake or BigQuery without breaking hundreds of reports. How would you plan it?
- Leadership asks you to cut the cloud warehouse bill by 40 percent without hurting the business. What do you do?
- A metric definition changed and you must backfill two years of a large fact table while the daily pipeline keeps running. How do you do it safely?
- Design a CDC pipeline that replicates a busy PostgreSQL database into Iceberg or Delta tables, including updates and deletes. What are the tricky parts?