Interview practice question
Safe daily reload of a partition
Data Engineering · SQL · Experienced
Your daily job loads one day of sales into a big table. Reruns sometimes create duplicates. Write the safe pattern.
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Wrap delete and insert of that day in one transaction.
- DELETE WHERE sale_date = :run_date, then INSERT the day's data.
- Reruns replace the day instead of adding to it.
- Readers see either old or new data, never half.
- Partition-overwrite features do the same on lakehouse engines.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.