Feature Function

class databricks.ml_features.entities.feature_function.FeatureFunction(*, udf_name: str, input_bindings: Optional[Dict[str, str]] = None, output_name: Optional[str] = None)

Bases: _FeatureStoreObject

Note

Aliases: databricks.feature_engineering.entities.feature_function.FeatureFunction, databricks.feature_store.entities.feature_function.FeatureFunction

Value class used to specify a Python user-defined function (UDF) in Unity Catalog to use in a TrainingSet.

Parameters
  • udf_name – The Python UDF name.

  • input_bindings – Mapping of UDF inputs to features in the TrainingSet.

  • output_name – Output feature name of this FeatureFunction. If empty, defaults to the fully qualified udf_name when evaluated.

__init__(*, udf_name: str, input_bindings: Optional[Dict[str, str]] = None, output_name: Optional[str] = None)

Initialize a FeatureFunction object. See class documentation.

property udf_name: str

The name of the Python UDF called by this FeatureFunction.

property input_bindings: Dict[str, str]

The input to use for each argument of the Python UDF.

For example:

{"x": "feature1", "y": "input1"}

property output_name: Optional[str]

The output name to use for the results of this FeatureFunction. If empty, defaults to the fully qualified udf_name when evaluated.