Feature Store
Feature Store client.
Access it as client.feature_store on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.
Methods
All methods
apply
apply(store_id: str, *, entities: Sequence[Mapping[str, Any]] | None = None, views: Sequence[Mapping[str, Any]] | None = None, services: Sequence[Mapping[str, Any]] | None = None) -> FeatureApplyResult
Register/update entities, views and services (applied in dependency order).
Each view's change says what the apply did: created (its first
version), identical, additive (updated in place) or breaking
(a new version).
An on-demand view's transformCode defines transform(df): a pandas
DataFrame of its source views' features and request fields in, a DataFrame
with the view's features out (same rows). Applying it deploys its sandboxed
transform workflow; any change to it is a new version.
create_store
create_store(name: str, *, offline: Mapping[str, Any], snapshot_retention_days: int | Literal['until_store_deleted'], online: Mapping[str, Any] | None = None, description: str | None = None) -> FeatureStoreRecord
Create a feature store.
offline is the Postgres its history lives in and online the Redis it serves
from (online serving is on when given), each {"serviceKind": "addon" | "datasource", "serviceId": ...}` you may use. `snapshot_retention_days is how long its training
snapshots are kept: 1 to 3650 days, or "until_store_deleted". The store starts
pending and is ready once its Postgres is reachable.
delete_snapshot
delete_snapshot(store_id: str, snapshot_id: str) -> None
Delete one training snapshot; refused (409) while an AutoML job trains from it.
delete_store
delete_store(store_id: str) -> None
Delete a store and everything defined in it; refused while something uses it.
Its views' offline tables and online keys in its add-ons are dropped (nothing else in them; the add-ons stay). A drop that fails fails the delete, naming why.
delete_view
delete_view(store_id: str, view: str, version: int) -> None
Delete one version of a view; refused while a feature service pins it.
Its offline tables and online keys in the store's add-ons are dropped (nothing else; the add-ons stay), and an on-demand version's transform is removed.
deprecate_view
deprecate_view(store_id: str, view: str, version: int) -> FeatureViewDeprecated
Deprecate a version of a view (e.g. the older one after a breaking change).
A deprecated version is read-only and hidden from discovery; it is kept, and the feature services pinned to it still resolve it.
forget_entities
forget_entities(store_id: str, view: str, entity_rows: Sequence[Mapping[str, Any]]) -> FeatureEntitiesForgotten
Delete every row of some entities from a view.
In each version of the view: their history rows (offline store), stream tiles and live
values (online store). Each entity row is exactly the view's join keys, typed as the
entity declares them, e.g. [{"customer_id": 990000}]. A view with a source table
keeps the source's rows.
get_historical_features
get_historical_features(store_id: str, feature_service: str, entity_rows: Sequence[Mapping[str, Any]] | None = None, *, entity_s3_uri: str | None = None, entity_format: str | None = None) -> HistoricalFeatures
Generate leak-free point-in-time training data.
Supply the entity/label frame exactly one way: inline entity_rows, or entity_s3_uri
(an s3:// URI or bare key of a Parquet/CSV frame, the bulk path for training-scale label
sets). Returns the training set: snapshot_url is a signed link that downloads its
Parquet snapshot straight from storage until snapshot_url_expires_at (5 minutes).
get_online_features
get_online_features(store_id: str, feature_service: str, entity_rows: Sequence[Mapping[str, Any]], *, max_staleness_seconds: int | None = None) -> OnlineFeatures
Resolve the latest online feature values for a feature service.
get_store
get_store(store_id: str) -> FeatureStoreDetail
Get a feature store with its entities, views (all versions), services.
list_snapshots
list_snapshots(store_id: str, *, limit: int | None = None) -> SyncPaginator[FeatureStoreSnapshot]
List a store's training snapshots, newest first (needs edit access to the store).
list_stores
list_stores(*, limit: int | None = None) -> SyncPaginator[FeatureStoreSummary]
List the feature stores the caller can use (summaries), a page at a time.
materialize
materialize(store_id: str, view: str) -> FeatureMaterialization
Run the incremental offline -> online materialization for a view.
A batch view with a source table pulls the source's new rows into its
history first (ingested in the result; None without a source).
push
push(store_id: str, view: str, events: Sequence[Mapping[str, Any]]) -> FeatureEventsPushed
Push real-time events to a STREAM aggregation view.
Each event carries the entity join keys, an event_timestamp, and the aggregation source
column(s); events are folded into the view's windowed online + offline tiles. Events may
arrive out of order: one within the view's allowedLateness of its entity's newest
event updates the online values exactly as if it had arrived in order (a view whose
allowedLateness is its longest window applies every event a live value reads); a
later one counts in training data only. This is the real-time path (use write for the
batch/offline history path).
update_store
update_store(store_id: str, *, name: str | None = None, description: str | None = None, snapshot_retention_days: int | Literal['until_store_deleted'] | None = None) -> FeatureStoreRecord
Rename a store, change its description, or set how long its training snapshots are kept.
snapshot_retention_days is 1 to 3650 days, or "until_store_deleted"; older
snapshots are deleted hourly, except those an unfinished AutoML job trains from.
view_online_values
view_online_values(store_id: str, view: str, entity_rows: Sequence[Mapping[str, Any]], *, view_version: int | None = None) -> ViewOnlineValues
Read the live values of every feature one view serves, for each entity row.
Each row carries the view's join keys. A stream view's windowed aggregates are served as
of now; a batch view's are its materialized values. view_version pins a version
(default: the newest). To read what a model is served, use online_features.
write
write(store_id: str, view: str, rows: Sequence[Mapping[str, Any]]) -> FeatureRowsWritten
Ingest feature rows into a view's offline history.