Finance says yesterday's revenue is wrong again. The nightly incremental load duplicates orders on re-runs, drops late updates, shifts orders to the wrong day and loses cents. Make the load idempotent and the revenue report trustworthy.
This is the practice version. Assessments always use a variant you have never seen.
Finance closed the books and found yesterday's revenue 6% higher than the payment processor's. The nightly job in etl/load.py copies changed orders from the shop's export into the
warehouse table fact_orders, and etl/report.py turns that table into daily revenue.
What the export guarantees:
updated_at is at or after the watermark minus . Rows can arrive
up to 15 minutes late, so an export may include rows older than the last watermark.paid → refunded).run_incremental safe to re-run: one row per order, always the newest version.updated_at in UTC, put each order on its UTC order_date, and parse money exactly.daily_revenue must count paid orders only, as amount − discount (a missing discount is 0).Run python3 -m unittest discover -s tests. A hidden suite replays late, duplicated and corrected exports.
| Specify Bearing Fits and a Tolerance Stack-Up on a Gearbox Shaft DrawingCAD & engineeringTiers: Mid-levelEditorial | Hard | File deliverable | 45 min | Calibrating |
| Clean Up a Hard-Coded Sales Quote CalculatorFinance & analyticsTiers: FresherEditorial | Easy | File deliverable | 30 min | Calibrating |
| Close the Holes in a Notes API Before the Pen TestSecurityTiers: JuniorEditorial | Medium | Code repo | 45 min | Calibrating |