Ingesting and Serving
Ingesting and refreshing values
Write feature rows into a view's history, then materialize the view to publish the latest values to the online store:
client.feature_store.write(store_id, "driver_stats", rows=[
{"driver_id": 1001, "event_timestamp": "2026-07-30T00:00:00Z", "conv_rate": 0.75, "acc_rate": 0.9},
])
client.feature_store.materialize(store_id, "driver_stats")
A batch view built over a source table needs no write: materializing it pulls the source's new rows into the history first, and the source is also pulled every five minutes. Materialization is incremental: it publishes only what changed since the last run and never moves an older value over a newer one. For streaming views, values update continuously as events arrive, and windowed aggregations (for example a 24-hour sum) are kept current automatically.
Forgetting entities
To remove an entity's data (a customer who asked to be forgotten, or rows written by mistake), forget it on the view: every row of the entities you give is deleted from each version of the view, their history rows, stream tiles and live values. Other entities are untouched. On the view's page, Forget entities takes a JSON array of the entities' join keys; from code:
client.feature_store.forget_entities(store_id, "customer_stats", entity_rows=[
{"customer_id": 990000}, {"customer_id": 990001},
])
Each entity is exactly the view's join keys, typed as the entity declares them. A view built over a source table keeps the source's rows: delete them there too. Training snapshots already taken keep the rows they hold.
Serving features online
Once a view is materialized, resolve the latest features for a set of entities. You send only the entity keys and receive the current feature values:
online = client.feature_store.get_online_features(
store_id, "driver_model_v1", entity_rows=[{"driver_id": 1001}]
)
print(online["results"])
Each result reports the resolved features and lists any that were missing (an entity with no value yet), so absent data is always visible and never silently filled in. You can set a maximum staleness so a value older than your tolerance is reported as missing rather than served stale.
Generating training data
To train, ask for point-in-time correct features for a set of labeled examples. For each row, the feature store resolves each feature as of that row's event_timestamp, so a training set never contains information that was not yet known at that moment:
training = client.feature_store.get_historical_features(
store_id,
"driver_model_v1",
entity_rows=[
{"driver_id": 1001, "event_timestamp": "2026-07-30T12:00:00Z", "label": 1},
{"driver_id": 1002, "event_timestamp": "2026-07-30T12:00:00Z", "label": 0},
],
)
print(training["snapshot_url"], training["num_rows"])
The training set is delivered as a Parquet snapshot you read directly; the store keeps it for its training-snapshot retention (see Training snapshots). For large label sets, point at a Parquet or CSV file in your storage instead of listing the rows inline:
training = client.feature_store.get_historical_features(
store_id, "driver_model_v1",
entity_s3_uri="s3://your-bucket/labels/train.parquet",
)