Python for Data · Lesson 6 of 6 · 20 min
Mini project: a loader that is safe to run twice
Build the heart of every data pipeline: a load step that never duplicates data, however many times it runs.
A scheduled loader downloads new data every day and adds it to a table. Sooner or later it runs twice, or a batch overlaps with yesterday's. If your loader simply appends, the same orders end up in the table twice and every total is wrong. A loader that gives the same result however many times it runs is called idempotent.