Skip to content

Feature View#

A feature view is a set of features that come from one or more feature groups. It is a logical view over the feature groups, as the feature data is only stored in feature groups. Feature views are used to read feature data for both training and serving (online and batch). You can create training datasets, create batch data and get feature vectors.

If you want to understand more about the concept of feature view, you can refer to here.


Query and transformation function are the building blocks of a feature view. You can define your set of features by building a query. You can also define which columns in your feature view are the labels, which is useful for supervised machine learning tasks. Furthermore, in python client, each feature can be attached to its own transformation function. This way, when a feature is read (for training or scoring), the transformation is executed on-demand - just before the feature data is returned. For example, when a client reads a numerical feature, the feature value could be normalized by a StandardScalar transformation function before it is returned to the client.

# create a simple feature view
feature_view = fs.create_feature_view(

# create a feature view with transformation and label
feature_view = fs.create_feature_view(
        "amount": fs.get_transformation_function(name="standard_scaler", version=1)
// create a simple feature view
FeatureView featureView = featureStore.createFeatureView()

// create a feature view with label
FeatureView featureView = featureStore.createFeatureView()

You can refer to query and transformation function for creating query and transformation_function.


Once you have created a feature view, you can retrieve it by its name and version.

feature_view = fs.get_feature_view(name="transactions_view", version=1)
FeatureView featureView = featureStore.getFeatureView("transactions_view", 1)


If there are some feature view instances which you do not use anymore, you can delete a feature view. It is important to mention that all training datasets (include all materialised hopsfs training data) will be deleted along with the feature view.



Feature views also support tags. You can attach, get, and remove tags. You can refer to here if you want to learn more about how tags work.

# attach
feature_view.add_tag(name="tag_schema", value={"key", "value"}

# get

// attach
Map<String, String> tag = Maps.newHashMap();
tag.put("key", "value");
featureView.addTag("tag_schema", tag)

// get

// remove


Once you have created a feature view, you can now create training data