Original practice scenario inspired by NextEra Energy, Inc.'s public business context; this is not a reported interview question or a description of its internal systems. A fictional utility evaluates hourly demand forecasts issued each morning for the next day. Its dataset includes delayed meter readings and revised temperature forecasts. Design the training and scoring boundaries.
Read model answer +
Each simulated morning must expose only records and forecast vintages available by that issue time. The prediction horizon and the data availability delay together define the real training boundary.
Work through it
Store event time and ingestion time separately. Exclude recent meter readings that had not yet arrived, even if their event timestamps precede the forecast origin.
Fit each candidate on the same eligible history and score the same next-day hours. Compare with previous-day and previous-week baselines using documented daylight-saving handling.
Aggregate errors over completed forecast days and inspect peaks, holidays, and missing-input periods. Keep the final next-day operational forecast separate from scored historical predictions.
Tradeoffs to discuss
Retraining at every origin costs more than a coarse backtest but better reproduces the deployed update schedule. Use a smaller replay if necessary.
Common pitfalls
Revised weather forecasts leak future knowledge.
A final model fit on all available data must not be used to rescore earlier origins.
Original practice scenario inspired by NextEra Energy, Inc.'s public business context; this is not a reported interview question or a description of its internal systems. A synthetic meter pipeline receives readings with meter_id, interval_start, revision, and value. Messages arrive out of order and may be duplicated. Explain the update rule and the tests needed for a reliable materialized view.
Read model answer +
Use meter and interval as the business key, then accept only the highest valid revision for that key. Delivery order should not determine the final reading when explicit revisions exist.
Work through it
Validate units, interval alignment, and revision type before updating. Define what to do when two payloads have the same revision but different values.
Apply a conditional atomic upsert that replaces an older revision and ignores an identical replay. Retain an audit record of accepted corrections.
Test reversed arrival order, repeated messages, equal-revision conflicts, negative corrections where allowed, and a crash during update. Replaying the same set should produce the same view.
Tradeoffs to discuss
Keeping raw events and current state costs more storage but permits reconstruction and correction analysis. A quarantine path handles contradictory revisions without silent overwrite.
Common pitfalls
Using ingestion timestamps as versions makes replay order significant.
Rejecting all duplicate keys would discard legitimate later corrections.