Point-in-time joins
Quick answer
A point-in-time join selects feature values that could actually have been known at the time a prediction was made. An event timestamp alone is insufficient when data arrives late or is corrected after the decision. Examples use standard-library Python; native Feast and Airflow are not executed. ByteMind execution is unverified.
Exclude unavailable correction
rows=[(4,4,10),(4,8,90),(7,7,30)]t=6print(max(r for r in rows if r[0]<=t and r[1]<=t)[2])Expected output (locally tested): 10. The later correction and future event are both ineligible.
How it works
For a prediction at integer time t, select records for the same entity with event_time <= t and available_time <= t, and enforce a declared freshness window (here inclusive age <= TTL). Among eligible rows choose the greatest event time, then greatest availability time; resolve a remaining tie using a stable version identifier or reject ambiguous records. If no candidate remains, return missing and apply a documented missing-value policy. Event time describes the observation; availability time describes when the prediction system could read that version. For a late correction at event 4 available at 8, a prediction at 6 cannot use it even if its event time is old. Do not rewrite historical availability during a backfill; store original availability or mark unknown and exclude from strict replay. Feature stores often support temporal joins, but exact availability semantics depend on the source and implementation. The local lab enforces both times explicitly; it is not a claim about Feast defaults.
Freshness window
events=[1,5,8]; t=7; ttl=2print([e for e in events if 0<=t-e<=ttl])Expected output (locally tested): [5]. Age equal to TTL is allowed in this contract.
Common mistakes
A latest-row join leaks future events; filtering by event time alone leaks late corrections. A missing value is not automatically zero.
Practice and next steps
Construct a prediction at time 6 with an original event at 4 and a correction arriving at 8. Compare a latest-row join, event-only join and two-time join.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Point-in-time joins — knowledge check
Apply point-in-time joins to small examples and debugging scenarios.
Which timestamps must be checked?
What if a correction arrived after prediction?
What if every eligible value is stale?
What should a backfill preserve?
Does a feature store guarantee no leakage?