Let’s Get Certified
Module 04 / 15 · Manage data and models across teams

Build point-in-time features that teams can share

Organize training data and prevent late corrections from leaking into historical examples.

Build point-in-time features that teams can share

Work through the decision

On Tuesday at noon a team predicted a delivery delay. On Wednesday an analyst corrected Monday’s recorded stock level. Which stock value belongs in a replay of Tuesday’s prediction?

Check your reasoning

Record the event time and the first time each revision was available. For each training example, require both times to precede the prediction cutoff and choose the latest eligible observation. Keep versioned definitions and an entity key so offline features can be reproduced and online serving can fetch the same meaning.

Watch the source lesson at 31:32

Compare the choices

Point-in-time feature join
Select only records and revisions knowable at the prediction cutoff. Time-split evaluation alone cannot repair a leaking feature table.
Feature Store
Share governed feature definitions backed by BigQuery and synchronize eligible features for low-latency keyed lookup. Track freshness and ownership.
Sensitive Data Protection
Discover and classify sensitive fields, then redact or pseudonymize according to the purpose and approved access policy.
Dataflow
Use a managed Beam pipeline for streaming transforms with windows, event timestamps and late data. Choose it when those semantics matter.

Test the decision

Keep event tables in BigQuery and large images or audio in Cloud Storage, with a manifest connecting approved object versions to labels. Use SQL for warehouse-native transformations, Spark for a suitable distributed batch job or Dataflow for event-time streams. Test transformations on small data before scaling.

Practice the guide skills

  1. Design a BigQuery label table and a versioned Cloud Storage manifest for related images. Choose a stable example key and a time-based split. Watch 31:32
  2. Compare SQL, in-memory Python, distributed Spark and streaming Dataflow for four workloads with different sizes and windowing requirements. Watch 32:10
  3. Define an entity key and freshness objective for a Feature Store feature backed by BigQuery. Compare historical retrieval with a production lookup. Watch 37:07
  4. Identify direct and indirect identifiers in a sample. Select inspection, masking or tokenization and check what the downstream task actually requires. Watch 33:36

Official objectives for this lesson

Lab · Reconstruct features as they were known

Run this offline Python 3 replay. Hours are measured from a common start. Each observation has an event hour and the hour its value became available. Predict which inventory quantity each checkout could have seen.

# store, event hour, available hour, stock on hand
observations = [
    ("north", 8, 8, 12),
    ("north", 9, 12, 4),
    ("north", 9, 15, 6),
    ("south", 8, 11, 3),
]

def stock_at(store, cutoff):
    eligible = [(event, available, stock)
                for key, event, available, stock in observations
                if key == store and event <= cutoff and available <= cutoff]
    if not eligible:
        return "missing"
    event, available, stock = max(eligible, key=lambda row: row[:2])
    return stock

for store, cutoff in [("north", 10), ("north", 13),
                      ("north", 16), ("south", 9)]:
    print(store, cutoff, stock_at(store, cutoff))
Check the result
north 10 12
north 13 4
north 16 6
south 9 missing

The 09:00 observation cannot affect the 10:00 decision because it arrived at noon. Its correction becomes eligible at 15:00. Remove the availability condition and observe the leak. In a feature table preserve revision history, define a deterministic tie breaker for equal timestamps and document missing-key behavior.

Related lesson · Prepare model inputs that will also exist at prediction time

Knowledge check

Build point-in-time features that teams can share quiz

Answer 3 questions. Check each answer for an explanation.

Worked example · Build point-in-time features that teams can share