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: databricks.ml_features_common.entities._feature_store_object._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.

udf_name

The name of the Python UDF called by this FeatureFunction.

input_bindings

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

For example:

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

output_name

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