A reliable feature workflow is more than a place to save columns. This Databricks Feature Store guide explains how to design feature tables, manage keys and timestamps, support offline training and online inference, preserve point-in-time correctness, and monitor the conditions that create training-serving skew. Use the review checklists and release workflow before model launches, backfills, freshness investigations, and recurring feature-catalog reviews.
Overview
Feature engineering turns raw events into inputs that a machine-learning model can use. In Databricks, a feature table provides a governed, reusable representation of those inputs so teams can avoid rebuilding the same transformations independently for every model. Depending on the workload and the capabilities enabled in the workspace, teams may use tables governed through Unity Catalog, feature lookup patterns, model-serving integrations, or other supported online and offline serving approaches. The exact interface and API names can change, so verify examples against the Databricks Runtime, workspace, and feature-engineering documentation used by your project.
The central design goal is training-serving consistency: the feature values used during training should represent the same business definitions and transformation logic used when predictions are generated. A feature catalog is useful only when its definitions, ownership, freshness, access controls, and serving behavior are clear.
A practical feature workflow has five parts:
- Define the entity, feature meaning, and acceptable time semantics.
- Write the feature table with stable keys, timestamps, and documented data types.
- Build training datasets with point-in-time-correct feature values.
- Publish or expose features through the serving pattern required by the model.
- Monitor quality, freshness, usage, and changes through the model lifecycle.
What to track
Feature-table design
Start with the entity a row describes. A customer risk feature might use customer_id; a product feature might use product_id. If the table contains historical values, include an event or effective timestamp such as feature_timestamp. Decide whether the intended grain is one row per entity, one row per entity and time period, or one row per event. Ambiguous grain is a common source of duplicate records and incorrect joins.
For each feature, record a small contract:
- Name and definition: describe the business meaning, not just the SQL expression.
- Data type and allowed range: identify whether nulls, negative values, or special sentinel values are valid.
- Keys: document entity columns and any composite-key requirements.
- Time semantics: distinguish event time, processing time, and effective time.
- Freshness target: state how old a value may be before it is unsafe for prediction.
- Owner and dependencies: identify the producing pipeline, upstream tables, and responsible team.
Offline and online access
Offline access supports feature exploration, historical training, validation, backfills, and analysis. It normally favors scalable table reads and reproducible snapshots. Online access supports low-latency prediction and usually requires a serving path optimized for point lookups by entity key. Do not assume that a feature table written for analytics is automatically suitable for online inference; latency, availability, synchronization, serialization, and access permissions must be tested separately.
| Concern | Offline feature access | Online feature access |
|---|---|---|
| Primary use | Training, validation, backfills, and analysis | Real-time or near-real-time inference |
| Typical lookup | Range or join across entities and time | Point lookup by serving key |
| Main risk | Leakage, incorrect historical joins, and non-reproducible data | Stale, missing, or unavailable values at prediction time |
| Key requirement | Correct entity and timestamp alignment | Fast, unambiguous entity-key retrieval |
| Validation focus | Point-in-time correctness and distribution stability | Latency, freshness, availability, and fallback behavior |
Point-in-time correctness
When a training example represents a prediction at time T, every feature value must be one that would have been available at or before T. A current-value join can silently leak future information into training and make offline metrics look stronger than production performance. Use event timestamps, effective intervals, or a supported feature-lookup mechanism that preserves historical validity. Test edge cases around late-arriving events, duplicate timestamps, timezone conversions, and backfilled records.
Governance and lineage
Track who can read and modify feature data, where the table is registered, which pipelines produce it, and which models consume it. Unity Catalog can provide a governance foundation when configured for the workspace, but permissions and lineage should be verified in the actual environment rather than assumed. Treat feature definitions as versioned engineering assets: a change to a unit, aggregation window, null-handling rule, or key can change model behavior even when the column name remains the same.
Cadence and checkpoints
Feature operations benefit from both automated checks and scheduled human review. The following cadence is a practical starting point; adjust it to the business risk and update frequency of each feature set.
Every pipeline run
- Check schema, data types, required keys, duplicate-key behavior, and null rates.
- Record row counts, event-time coverage, and the latest available feature timestamp.
- Alert on failed writes, unexpected empty partitions, and freshness breaches.
- Validate that upstream dependencies completed successfully.
Before each model release
- Compare training and serving transformation logic.
- Run point-in-time leakage tests using deliberately delayed and historical examples.
- Test online lookups for known keys, unknown keys, missing features, and stale values.
- Compare feature distributions between the training set and a representative serving window.
- Confirm model, feature, table, and code versions can be traced to one another.
Monthly or quarterly review
- Review feature usage, owners, downstream models, and unused or duplicate definitions.
- Reassess freshness expectations against actual prediction behavior.
- Inspect drift, missingness, cardinality, and unusual changes in categorical values.
- Review permissions and remove access that no longer matches the operating role.
- Check whether platform, runtime, serving, or interface changes require updates to implementation guidance.
After a backfill or incident
Record the affected time range, tables, models, and predictions. Recompute only the intended period when possible, then compare before-and-after feature distributions and model outputs. A backfill should not be considered complete until downstream training datasets, online values, dashboards, and lineage records have been checked.
How to interpret changes
A change in model quality does not automatically mean the feature table is defective. Diagnose changes in layers. First ask whether data arrived on time and whether the schema or row grain changed. Next check whether the feature definition, aggregation window, or join logic changed. Then compare offline training values with the values available to the serving path at the same prediction times.
Common patterns provide useful clues:
- Offline metrics fall after a backfill: historical values or labels may have been corrected, or a previously leaked feature may have been fixed.
- Production metrics fall while offline metrics remain stable: investigate training-serving skew, stale online values, key mismatches, and real-time pipeline delays.
- Missingness rises for a subset of entities: inspect upstream coverage, key normalization, late events, and access or filtering changes.
- Latency rises without feature drift: review online lookup paths, payload size, serialization, and dependency health.
- Several features change together: look for a shared upstream source, timezone issue, schema migration, or pipeline deployment.
Keep a simple change log for every feature definition: previous expression, new expression, effective date, reason, approving owner, affected models, and rollback plan. If a semantic change is material, create a new feature version or name rather than silently changing the meaning of an existing column. The right choice depends on the compatibility guarantees of the consuming pipelines, but silent semantic changes are difficult to audit and reproduce.
Training-serving consistency test plan
- Select a fixed set of historical prediction requests with known entity keys and timestamps.
- Reconstruct the offline feature values available at each request time.
- Retrieve the corresponding values through the production serving path or a faithful test environment.
- Normalize expected differences such as serialization formats, then compare values within defined tolerances.
- Test missing keys, late data, nulls, duplicate records, and feature-service failures.
- Block release when differences exceed agreed thresholds, and retain the test output with the model version.
When to revisit
Revisit this guide before every model release, feature backfill, major upstream schema change, freshness incident, or migration to a different serving pattern. A monthly or quarterly feature-catalog review is also useful for finding stale definitions, unclear ownership, unused tables, and permission drift. Recheck implementation examples whenever Databricks changes feature-engineering APIs, supported online integrations, Unity Catalog behavior, or interface terminology.
Use this release workflow to update features without breaking models:
- Propose: document the new definition, expected behavior, affected entities, freshness target, and compatibility impact.
- Build in isolation: create a versioned table or controlled change and validate it against representative historical data.
- Compare: measure distribution, missingness, point-in-time correctness, serving latency, and prediction differences.
- Shadow or stage: make the new feature path available for testing without replacing the current production dependency.
- Approve and release: record reviewers, effective time, model dependencies, and rollback steps.
- Monitor: watch freshness, lookup failures, drift, model quality, and downstream alerts after activation.
- Retire deliberately: remove the old definition only after dependent models, notebooks, jobs, and dashboards have been migrated.
Keep the review checklist with the feature repository and link it to the model release record. For related operational context, see the Databricks MLflow Model Registry guide, the Databricks Lakeflow Connect guide, and the Databricks AI Governance Checklist. A feature table becomes dependable when its data, definitions, serving path, and ownership are reviewed as one system.