Skip to content

featurebyte.Deployment.compute_batch_feature_table

compute_batch_feature_table(
batch_request_table: Union[BatchRequestTable, SourceTable, View],
batch_feature_table_name: str,
columns: Optional[list]=None,
columns_rename_mapping: Optional[dict]=None
) -> BatchFeatureTable

Description

Get batch features asynchronously using a batch request table. The batch request features will be materialized into a batch feature table.

Parameters

  • batch_request_table: Union[BatchRequestTable, SourceTable, View]
    Batch request table object, source table object, or view object that contains required serving names columns

  • batch_feature_table_name: str
    Name of the batch feature table to be created

  • columns: Optional[list]
    Include only these columns when creating the batch feature table. If None, all columns are included. Not applicable when batch_request_table is a BatchRequestTable.

  • columns_rename_mapping: Optional[dict]
    Rename columns in the source table using this mapping from old column names to new column names when creating the batch feature table. If None, no columns are renamed. Not applicable when batch_request_table is a BatchRequestTable.

Returns

  • BatchFeatureTable

Examples

Compute batch features using a batch request table.

>>> deployment = catalog.get_deployment(<deployment_name>)
>>> batch_features = deployment.compute_batch_feature_table(
...     batch_request_table=batch_request_table,
...     batch_feature_table_name="<batch_feature_table_name>",
... )
Compute batch features using a source table.

>>> deployment = catalog.get_deployment(<deployment_name>)
>>> batch_features = deployment.compute_batch_feature_table(
...     batch_request_table=source_table,
...     batch_feature_table_name="<batch_feature_table_name>",
...     columns=["cust_id"],
...     columns_rename_mapping={"cust_id": "GROCERYCUSTOMERGUID"},
... )