Skip to content

Feature#

Feature #

Metadata object representing a feature in a feature group in the Feature Store.

See Training Dataset Feature for the feature representation of training dataset schemas.

default_value property writable #

default_value: str | None

Default value of the feature as string, if the feature was appended to the feature group.

description property writable #

description: str | None

Description of the feature.

feature_group_id property #

feature_group_id: int | None

ID of the feature group to which this feature belongs.

foreign property writable #

foreign: bool

Whether the feature is part of the foreign key of the feature group.

hudi_precombine_key property writable #

hudi_precombine_key: bool

Whether the feature is part of the hudi precombine key of the feature group.

name property writable #

name: str

Name of the feature.

on_demand property writable #

on_demand: bool

Whether the feature is a on-demand feature computed using on-demand transformation functions.

online_type property writable #

online_type: str | None

Data type of the feature in the online feature store.

partition property writable #

partition: bool

Whether the feature is part of the partition key of the feature group.

primary property writable #

primary: bool

Whether the feature is part of the primary key of the feature group.

type property writable #

type: str | None

Data type of the feature in the offline feature store.

Not a Python type

This type property is not to be confused with Python types. The type property represents the actual data type of the feature in the feature store.

use_fully_qualified_name property writable #

use_fully_qualified_name: bool

Use fully qualified name for the feature when generating dataframes for training/batch data.

contains #

contains(other: str | list[Any]) -> filter.Filter

Construct a filter similar to SQL's IN operator.

Deprecated

contains method is deprecated. Use Feature.isin instead.

PARAMETER DESCRIPTION
other

A single feature value or a list of feature values.

TYPE: str | list[Any]

RETURNS DESCRIPTION
filter.Filter

A filter that leaves only the feature values also contained in other.

is_complex #

is_complex() -> bool

Returns true if the feature has a complex type.

Example
# connect to the Feature Store
fs = ...

# get the Feature Group instance
fg = fs.get_or_create_feature_group(...)

selected_feature = fg.get_feature("min_temp")
selected_feature.is_complex()

isin #

isin(other: str | list[Any]) -> filter.Filter

Returns IN filter for the feature; replicating the behavior of SQL IN clause.

like #

like(other: Any) -> filter.Filter

Returns LIKE filter for the feature; replicating the behavior of SQL LIKE clause.

to_dict #

to_dict() -> dict[str, Any]

Get structured info about specific Feature in python dictionary format.

Example
# connect to the Feature Store
fs = ...

# get the Feature Group instance
fg = fs.get_or_create_feature_group(...)

selected_feature = fg.get_feature("min_temp")
selected_feature.to_dict()