Feature Spec

class databricks.ml_features_common.entities.feature_spec.FeatureSpec(column_infos: List[ColumnInfo], table_infos: List[FeatureTableInfo], function_infos: List[FunctionInfo], workspace_id: int, feature_store_client_version: str, serialization_version: int)

Bases: _FeatureSpecBase

__init__(column_infos: List[ColumnInfo], table_infos: List[FeatureTableInfo], function_infos: List[FunctionInfo], workspace_id: int, feature_store_client_version: str, serialization_version: int)

Column Info

class databricks.ml_features_common.entities.column_info.ColumnInfo(info: Union[SourceDataColumnInfo, FeatureColumnInfo, OnDemandColumnInfo], include: bool, data_type: Optional[str] = None, topological_ordering: Optional[int] = None)

Bases: _FeatureStoreObject

ColumnInfo’s structure and properties are mapped 1:1 to the ColumnInfo proto message, unless specified otherwise.

__init__(info: Union[SourceDataColumnInfo, FeatureColumnInfo, OnDemandColumnInfo], include: bool, data_type: Optional[str] = None, topological_ordering: Optional[int] = None)

Initializes a ColumnInfo object representing a column stored in FeatureSpec.

Parameters
  • info – The column information object. Must be one of SourceDataColumnInfo, FeatureColumnInfo, or OnDemandColumnInfo.

  • include – Specifies whether the column should be included in the final output. When False, the column will be excluded from the resulting DataFrame in training_set.load_df() and from the DataFrame used for model.predict() within fe.score_batch().

  • data_type – Optional. The data type of the column.

  • topological_ordering – Optional. The topological ordering index of the column when resolving the value of the column.

property data_type: Optional[str]

FeatureSpecs before v7 are not required to have data types.

property topological_ordering: Optional[int]

FeatureSpecs before v8 are not required to have topological ordering.

property output_name: str

This field does not exist in the proto, and is provided for convenience.

class databricks.ml_features_common.entities.source_data_column_info.SourceDataColumnInfo(name: str)

Bases: _FeatureStoreObject

__init__(name: str)
property output_name: str

This field does not exist in the proto, and is provided for convenience.

class databricks.ml_features_common.entities.feature_column_info.FeatureColumnInfo(table_name: str, feature_name: str, lookup_key: List[str], output_name: str, timestamp_lookup_key: Optional[List[str]] = None, default_value_str: Optional[str] = None)

Bases: _FeatureStoreObject

__init__(table_name: str, feature_name: str, lookup_key: List[str], output_name: str, timestamp_lookup_key: Optional[List[str]] = None, default_value_str: Optional[str] = None)
class databricks.ml_features_common.entities.on_demand_column_info.OnDemandColumnInfo(udf_name: str, input_bindings: Dict[str, str], output_name: str)

Bases: _FeatureStoreObject

__init__(udf_name: str, input_bindings: Dict[str, str], output_name: str)
property input_bindings: Dict[str, str]

input_bindings is serialized as the InputBindings proto message.

Other Entities

class databricks.ml_features_common.entities.feature_table_info.FeatureTableInfo(table_name: str, table_id: Optional[str], lookback_window: Optional[float] = None)

Bases: _FeatureStoreObject

__init__(table_name: str, table_id: Optional[str], lookback_window: Optional[float] = None)
class databricks.ml_features_common.entities.function_info.FunctionInfo(udf_name: str)

Bases: _FeatureStoreObject

__init__(udf_name: str)

Feature Spec Info

class databricks.ml_features.entities.feature_spec_info.FeatureSpecInfo(name, creator, creation_timestamp_ms)

Bases: _FeatureStoreObject

Note

Aliases: databricks.feature_engineering.entities.feature_spec_info.FeatureSpecInfo, databricks.feature_store.entities.feature_spec_info.FeatureSpecInfo

Value class describing a feature spec.

This will typically not be instantiated directly, instead the create_feature_spec() will create FeatureSpecInfo objects.