Feature Lookup

class databricks.feature_store.entities.feature_lookup.FeatureLookup(table_name: str, lookup_key: Union[str, List[str]], *, feature_names: Union[str, List[str], None] = None, rename_outputs: Optional[Dict[str, str]] = None, timestamp_lookup_key: Union[str, List[str], None] = None, **kwargs)

Bases: databricks.feature_store.entities._feature_store_object._FeatureStoreObject

Value class used to specify a feature to use in a TrainingSet.

Parameters:
  • table_name – Feature table name.
  • lookup_key – Key to use when joining this feature table with the DataFrame passed to FeatureStoreClient.create_training_set(). The lookup_key must be the columns in the DataFrame passed to FeatureStoreClient.create_training_set(). The type and order of lookup_key columns in that DataFrame must match the primary key of the feature table referenced in this FeatureLookup.
  • feature_names – A single feature name, a list of feature names, or None to lookup all features (excluding primary keys) in the feature table at the time that the training set is created. If your model requires primary keys as features, you can declare them as independent FeatureLookups.
  • rename_outputs – If provided, renames features in the TrainingSet returned by of FeatureStoreClient.create_training_set.
  • timestamp_lookup_key

    Key to use when performing point-in-time lookup on this feature table with the DataFrame passed to FeatureStoreClient.create_training_set(). The timestamp_lookup_key must be the columns in the DataFrame passed to FeatureStoreClient.create_training_set(). The type of timestamp_lookup_key columns in that DataFrame must match the type of the timestamp key of the feature table referenced in this FeatureLookup.

    Note

    Experimental: This argument may change or be removed in a future release without warning.

  • feature_name – Feature name. Deprecated as of version 0.3.4. Use feature_names.
  • output_name – If provided, rename this feature in the output of FeatureStoreClient.create_training_set. Deprecated as of version 0.3.4 . Use rename_outputs.
__init__(table_name: str, lookup_key: Union[str, List[str]], *, feature_names: Union[str, List[str], None] = None, rename_outputs: Optional[Dict[str, str]] = None, timestamp_lookup_key: Union[str, List[str], None] = None, **kwargs)

Initialize a FeatureLookup object.

table_name

The table name to use in this FeatureLookup.

lookup_key

The lookup key(s) to use in this FeatureLookup.

feature_name

The feature name to use in this FeatureLookup. Deprecated as of version 0.3.4. Use feature_names.

output_name

The output name to use in this FeatureLookup. Deprecated as of version 0.3.4. Use feature_names.