Interview practice question
Upserting daily changes into a large table
Data Engineering · Spark · Intermediate
You receive daily changed records and need to upsert them into a 5 TB Spark table. How do you do it efficiently?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Use a table format like Delta or Iceberg that supports MERGE.
- Deduplicate the source to one row per key first.
- Add partition or date predicates to the merge condition to limit scanning.
- Organize the target with clustering on the merge key or date.
- Monitor rewritten file counts.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.