Getting online features

Feast provides an API through which online feature values can be retrieved. This allows teams to look up feature values at low latency in production during model serving, in order to make online predictions.

Online stores only maintain the current state of features, i.e latest feature values. No historical data is stored or served.

from feast import Client

online_client = Client(

entity_rows = [
   {"driver_id": 1001},
   {"driver_id": 1002},

# Features in <featuretable_name:feature_name> format
feature_refs = [

response = online_client.get_online_features(
   feature_refs=feature_refs, # Contains only feature references
   entity_rows=entity_rows, # Contains only entities (driver ids)

# Print features in dictionary format
response_dict = response.to_dict()

The online store must be populated through ingestion jobs prior to being used for online serving.

Feast Serving provides a gRPC API that is backed by Redis. We have native clients in Python, Go, and Java.

Online Field Statuses

Feast also returns status codes when retrieving features from the Feast Serving API. These status code give useful insight into the quality of data being served.




The feature value was not found in the online store. This might mean that no feature value was ingested for this feature.


A entity key was successfully found but no feature values had been set. This status code should not occur during normal operation.


The age of the feature row in the online store (in terms of its event timestamp) has exceeded the maximum age defined within the feature table.


The feature values have been found and are within the maximum age.


Indicates a system failure.

Last updated