Interview practice question
Script fails halfway and reruns duplicate data
Data Engineering · Python · Beginner
Your daily Python load failed halfway, and when you reran it, half the data was loaded twice. How do you fix the design?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- The job appended data without a way to undo partial loads.
- Make each run work on a defined unit like a date.
- Delete or overwrite that unit before loading, or use MERGE.
- Do the warehouse write in one transaction.
- Track success with a status table and only mark done at the end.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.