replay_simulator.py reads a Bronze laps Parquet file, filters to one race, sorts by lap number, and prints (or streams) each lap in order. It’s the fastest way to look at what actually landed in a file without writing SQL.
--dry_run still sleeps 90 / speed seconds between laps to simulate real-time pacing it skips only the EventHub send, not the timing. At --speed 10 (the default), a full race replays in a few minutes; raise --speed further to print faster.Flags
string
required
Path to a Bronze laps Parquet file (race laps only qualifying laps aren’t supported).
string
required
The
race_id to filter to, in <season>_<round_number> form (e.g. 2024_1). A laps file can contain only one race, but this still filters defensively.float
default:"10.0"
Replay speed multiplier.
1.0 is real-time (~90s between laps); higher values replay faster.boolean
default:"false"
Print each lap’s payload without sending anything the only mode that works without EventHub credentials configured.
Why it exists
Bronze laps Parquet is easy to query but tedious to read a wide DataFrame of every driver’s every lap, unordered, withLapTime as a raw nanosecond integer. Replaying converts a row into something legible: lap number, driver, decoded lap time in seconds, compound, and tyre life, one line per lap, in race order. It doubles as a debugging tool for a single suspicious lap find it in the stream rather than filtering a DataFrame by hand.
The live EventHub path (
RaceReplaySimulator without --dry_run) targets a streaming-integration component that isn’t deployed yet. It has no effect on the rest of the pipeline today --dry_run is the working invocation.Next
Architecture
The full ingestion code walkthrough how a race’s laps got into the file you just replayed.