Unit 13 of 15 · about 4 hours · derive, implement

Point-in-time feature joins and online and offline feature equivalence

Training on a feature value the model could not have seen at prediction time is future leakage with infrastructure. The join rule is what keeps offline metrics honest about online behavior.

You'll be able to

  • Join features to entity rows as of each row's event time with TTL bounds, by hand on a small fixture.
  • Exclude backfilled values that were not yet available at prediction time with created-timestamp filtering.
  • Test that the online path serves the same values the offline join produced for the same entity and time.

Covers

Point-in-time feature joinsOnline and offline feature equivalence
1

Read

In this order, only the parts listed

0 of 2 done

  1. Point-in-time joins: entity frames, TTL, created timestampsFeast Documentation - Point-in-Time Joins and Feature Retrieval

    The entity dataframe and get_historical_features call; the TTL backward scan (TTL is relative to each entity timestamp, not to query time); the joined result with its two unjoined rows; Retrieving features as of the event time (filter_by_created_timestamp, NULL created timestamps excluded); Feast v0.66-branch documentation (page read 2026-10-15)

  2. Feature retrieval: historical versus online pathsFeast Documentation - Point-in-Time Joins and Feature Retrieval

    Event timestamp (upper bound, inclusive; leakage without it); Retrieving historical features; Retrieving online features (get_online_features takes entity rows without timestamps); Feature Services (one service per model version) (page read 2026-10-15)

2

Focus on

  • Each entity timestamp is an upper bound, inclusive. The join takes the latest feature row at or before it, scanning back at most the TTL. This is the mechanical fix for the future leakage in the Classical ML unit on leakage: target, future, entity, duplicate, preprocessing and feedback.
  • TTL is relative to each entity timestamp, not to query time. Reproducible results also need a pinned feature-source snapshot and join definition, since later backfills can change a retrieval; filter on availability time to reproduce what could have been served then.
  • Corrections and backfills carry a created timestamp. Without the filter flag, a value corrected after prediction time still joins into training.
  • Online serving returns the latest value with no timestamp argument. Version the feature definitions both paths use, log the served vector with its materialization state, and compare it with the historical join under the same snapshot, transforms, TTL and availability-time rules.
Common mistakes · 3
  • Joining the latest feature row regardless of the entity time. The (1, 30) row must never see the value from event time 35.
  • Enabling the created filter with NULL created timestamps. The docs exclude those rows instead of treating them as always available.
  • Comparing online output to a retrained offline join after a backfill. Equivalence is checked against the stored training frame, not a fresh recomputation.
3

Try it yourself

Closed-book, before checking anything

Without notes, with TTL 25, join feature rows (1, 10, 'a', 10), (1, 20, 'b', 20), (1, 28, 'b2', 40), (1, 35, 'c', 35) (entity, event time, value, created) to entity rows (1, 12), (1, 30), (1, 65), (2, 10) (entity, event time). Then repeat with created-timestamp filtering.
4

Quiz yourself

Answer first, then mark it. Missed ones go to Review.

0 got · 0 missed

  1. 1.Default join: what does each entity row get?Answer

    (1, 12) gets 'a'; (1, 30) gets 'b2'; (1, 65) gets nothing, since ; (2, 10) gets nothing, since entity 2 has no rows.

  2. 2.With created-timestamp filtering, what does (1, 30) get, and why?Answer

    'b'. The 'b2' row was created at 40, after the entity time 30, so it is excluded and the join falls back to the row from event time 20.

  3. 3.Why does the TTL miss on (1, 65) not depend on when the query runs?Answer

    TTL measures back from each entity timestamp: whenever the query runs. Query time never enters the join.

  4. 4.The online path serves 'c' for entity 1 while the stored training frame for a (1, 30) row holds 'b'. Is that a serving bug?Answer

    Not by itself: online serves the latest value and time has passed. Compare the logged online vector with the historical join under the same snapshot, transforms, TTL and availability-time rules; a mismatch there is the bug signal.

You're done when

Your hand join matches the stated answers for both flags, and you can say for any served value which entity time and filter produced it.

Only when you can do this without notes.

Leads to

Notes

Resources · 1 for this unit, 16 more in the section
  • Feast Documentation - Point-in-Time Joins and Feature RetrievalFeast · support

    Read Point-in-time joins (entity dataframes, get_historical_features, TTL backward scan, filter_by_created_timestamp) and Feature retrieval (event_timestamp as the inclusive upper bound, get_online_features without timestamps, feature services per model version, materialize refresh). Work the join logic on tiny local tables; do not deploy Feast. Page read 2026-10-15 (v0.66-branch documentation).

Also in this section

  • HLD Handbook - Reliability, Operations and Security at ScaleHLD Handbook · primary

    Read Part 6 observability, SLOs, resilience, overload, deployments, chaos, incidents and health, then Part 7 authentication, mTLS, secrets, tenancy and data governance chapters relevant to the capstone. Skip unrelated case studies.

  • DDIA 2e - Chapters 2, 5 and 14Martin Kleppmann and Chris Riccomini · support

    Use Chapter 2 "Describing Performance" for percentile and response-time vocabulary and Chapter 5 for compatibility during rolling upgrades. Chapter 14 is about predictive analytics, privacy and data governance, not operations: read its "Privacy and Tracking" section for the retention and deletion units.

  • Google SRE Books - SLOs, Monitoring, Overload, Cascades, Incidents and RecoveryGoogle · required

    Read SRE Chapter 4 (service level objectives), 6 (monitoring distributed systems), 21 (handling overload), 22 (addressing cascading failures), 14 (managing incidents) and 15 (postmortem culture); Workbook Chapter 2 (implementing SLOs) and 5 (alerting on SLOs); and Building Secure and Reliable Systems Chapter 5 (least privilege) and 9 (design for recovery). Convert each into one alert, limit, load test or runbook action in the capstone.

  • Metastable Failures in Distributed Systems (Bronson et al., 2021)HotOS · support

    Read the trigger and sustaining-effect model of metastable failure and the retry and shedding design prompts. Its model illustrates; it does not predict.

  • Metastable Failures in the Wild (Huang et al., 2022)USENIX OSDI · support

    Read the incident study for how retries and load sustain outages after the trigger ends; it is a sample of public reports, not a rate.

  • Simple Testing Can Prevent Most Critical Failures (Yuan et al., 2014)USENIX OSDI · support

    Read the findings on error-handling code and how few nodes and events reproduce most failures, as the case for testing error paths in your campaign. Its bounds come from one sample of 2014 systems.

  • Gray Failure: The Achilles' Heel of Cloud-Scale Systems (Huang et al., 2017)Microsoft Research · support

    Read the gray-failure model (differential observability between a detector and its clients) as vocabulary for telemetry and failure detection.

  • The Internals of PostgreSQL - Base Backup and Point-in-Time RecoveryHironobu Suzuki · support

    Read Chapter 10 (base backup, how PITR replays WAL, timelines and incremental backup) as the real-engine model for backup integrity, recovery points and restore verification. Note the date you read it.

  • Building Distributed Systems - The Tracer, The Securitor and The MigratorBuild Distributed Systems · optional

    Only the first three tasks of each track are free: in The Tracer, trace-context propagation, span lifecycle and a collector; in The Securitor, JWTs, the OAuth 2 code flow with PKCE and sessions; in The Migrator, schema migrations, expand and contract, and zero-downtime change. Tasks are graded in the browser after login, so treat a pass as a drill and keep your local harness as the evidence.

  • SPIFFE Workload Identity and Workload APISPIFFE Project · support

    Read the SPIFFE ID, X.509-SVID and trust bundle specifications and the Workload API (FetchX509SVID, FetchX509Bundles) to design service identity, short-lived credentials and bundle rotation. A local mock is sufficient unless a real SPIRE deployment answers a specific gap.

  • OpenTelemetry Signals and Semantic ConventionsOpenTelemetry · support

    Read signals and context propagation (W3C Trace Context traceparent, inject and extract, baggage rules), then the semantic conventions (1.44.0) for the RPC and messaging areas with their stability status. Define bounded attributes for request, node, partition, term and offset identities, and never infer global order from display timestamps.

  • Replicated Log and Stream Processor - Production ContractRoadmap-Final · support

    Add workload identity, tenant checks, audit, SLOs, capacity limits, backup and verified restore, mixed-version migration, rollback and reduced point-in-time ML data paths. Run one compound incident from detection through recovery.

  • OWASP Threat Modeling Cheat SheetOWASP · reference

    Use System Modeling (data-flow diagrams, trust boundaries, stores and processes), Threat Identification (the STRIDE table applied to components, data flows and trust boundaries) and Response and Mitigations to build the unit threat model.

  • MLflow Model Registry DocsMLflow · support

    Read the Model Registry page (registered models, versions, lineage to the producing run, aliases such as @champion, and tags) and the registry tutorial promotion flow. Stages are deprecated since MLflow 2.9; use aliases and tags. Page read 2026-10-15; the versioned docs move, so re-pin the version you read.

  • DVC Docs - Data VersioningDVC · support

    Read dvc add (Description and Example: Single file) for .dvc content-hash sidecars, the dvc.yaml page with its dvc.lock file section for pipeline state, and push and pull for transfer. A local directory remote is enough; do not set up cloud storage. Page read 2026-10-15.

  • PostgreSQL 18 Documentation - Recovery Targets, Backup Verification and RewindPostgreSQL Global Development Group · reference

    Read Section 19.5.6 Recovery Target, the pg_verifybackup reference and the pg_rewind reference for recovery stopping points, manifest checks and rejoining a diverged primary.