SQLMediumofficialBenchmark eligiblepro
Incremental order sync
Nightly MERGE scans all of orders_raw. Process only new/updated rows using updated_at, plus a documented lookback so late loader rows are not lost. unique_key is order_id.
| Field | Detail |
|---|---|
| Creator | PipelineArena · expert |
| Version | 2.0.0 |
| Time | 50 min |
| Credits | 4 |
| Completion | 0% · 0.0 rating |
| Hidden tests | 5 |
Objective
orders_curated matches after two ticks, including late rows inside the lookback.
| # | Success condition |
|---|---|
| 1 | Watermark stored and advanced |
| 2 | Late rows within a 3-day lookback are applied |
| 3 | Updates upsert on order_id (no duplicates) |
| 4 | Second run with no new data is a no-op |
| # | Visible instruction |
|---|---|
| 1 | Filter source with updated_at greater than max(target.updated_at) minus 3 days. |
| 2 | MERGE / upsert on order_id. |
| 3 | Persist the watermark after a successful apply. |
Hidden tests score the final tables or files, not the exact syntax you used. Test implementation is never shown to participants.
Signed-in workspace: Open in app