The Ceiling: Week 10
The Ceiling
Next drop Monday Nov 23, 16:00 UTC6 inThe challenge
You're a data engineer at an airline. Every airport reports its weather about once an hour as a METAR, a short line of code that pilots read. Collectors logged each METAR as 1 JSON line, and the dispatch team needs 1 clean row per report to study the delays around New Year. Write the code that turns the log into that table.
The mess
Each country's weather service writes the code with its own habits. The log is each airport's file for the same 4 days, one after another. An airport that loses its link sends what it missed when it returns. Observers fix a report by sending it again. An older relay covers some airports in a format of its own. Some collectors read a circuit, some a public archive; each logs all it is sent.
1,000,000 messages
Click a column for its requirements, or click the bottom of the sheet to see the 10 sample rows to produce.
Notes from dispatch
- 1 row per airport and observation time.
- When an airport reports a time again, the copy logged last stands.
- A report states its day of the month and its time, never the month.
- received_at, feed and other collector extras are bookkeeping.
- A collector reads its circuit a line at a time; a long report takes 2.
How you're scored
- +1the right value. A right null counts.
- 0null where the source held a value. Silence is free.
- −1a wrong value. Silent corruption costs.
- −2a row that should not exist: no matching key, or a second row for the same key. The last row for a key is the one scored.