A daily job sounds fresh enough. Measure how old its values really are when the model reads them.
Predict
The data runs through midnight, and the daily load lands at 04:10. How old is the value at 04:09?
The age of a daily feature, by when it's read
00:00
24 h
04:09
28 h 9 min
04:11
4 h 11 min
12:00
12 h
23:59
23 h 59 min
The data runs through midnight, and the load lands at 04:10. Just before it, the value is still yesterday's load.
Age counts from when the data ends, not from when the job finishes. At 04:09 the store still holds yesterday's load, built from data that ended 28 hours and 9 minutes earlier. At 04:11 the new load is there, and its data is 4 hours and 11 minutes old.
Averaged over the day, a daily feature is about 16 hours old: 4 hours 10 minutes, plus half of 24 hours. That's the number to have in your head when someone says daily.
And when the job runs late or fails, nothing tells you. The online store keeps serving yesterday's values, with no error anywhere.
In the editor, write age_hours(t): how old the data behind a daily feature is when a request reads it at hour t. Check it against the chart: about 28.15 hours at 04:09, and about 4.18 at 04:11.
Pick an answer above to see the rest
Instructions
1
A daily job's data runs through midnight, and its output lands online at hour lands, where 4 + 10 / 60 is 04:10. Write age_hours(t, lands=4 + 10 / 60): how many hours old the data is behind the value a request reads at hour t of the day, 0 <= t < 24. Until the new load lands, the store still serves yesterday's.