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, lookback_window: Optional[datetime.timedelta] = 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 toFeatureStoreClient.create_training_set()
. Thelookup_key
must be the columns in the DataFrame passed toFeatureStoreClient.create_training_set()
. The type and order oflookup_key
columns in that DataFrame must match the primary key of the feature table referenced in thisFeatureLookup
. - 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 ofFeatureStoreClient.create_training_set
. - timestamp_lookup_key –
Key to use when performing point-in-time lookup on this feature table with the
DataFrame
passed toFeatureStoreClient.create_training_set()
. Thetimestamp_lookup_key
must be the columns in the DataFrame passed toFeatureStoreClient.create_training_set()
. The type oftimestamp_lookup_key
columns in that DataFrame must match the type of the timestamp key of the feature table referenced in thisFeatureLookup
.Note
Experimental: This argument may change or be removed in a future release without warning.
- lookback_window –
The lookback window to use when performing point-in-time lookup on the feature table with the dataframe passed to
FeatureStoreClient.create_training_set()
. Feature Store will retrieve the latest feature value prior to the timestamp specified in the dataframe’stimestamp_lookup_key
and within thelookback_window
, or null if no such feature value exists. When set to 0, only exact matches from the feature table are returned.Note
Available in version >= 0.13.0
- 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 . Userename_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, lookback_window: Optional[datetime.timedelta] = None, **kwargs) Initialize a FeatureLookup object. See class documentation.
-
feature_name
The feature name to use in this FeatureLookup. Deprecated as of version 0.3.4. Use
feature_names
.