Skip to content

featurebyte.Deployment.compute_batch_features

compute_batch_features(
batch_request_table: Union[BatchRequestTable, SourceTable, View, str],
output_table_name: str,
output_table_snapshot_date: Union[str, date, NoneType]=2025-08-04,
output_table_snapshot_date_name: str="snapshot_date",
output_table_snapshot_date_as_timeseries_key: bool=False,
columns: Optional[list]=None,
columns_rename_mapping: Optional[dict]=None,
point_in_time: Union[datetime, str, NoneType]=None,
use_deployed_tile_tables: bool=False
)

Description

Compute batch features asynchronously using a batch request table. The batch request features will be materialized into a specified table in the data warehouse.

Parameters

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

  • output_table_name: str
    Fully qualified name of the output table to be created or appended in the data warehouse.

  • output_table_snapshot_date: Union[str, date, NoneType]
    default: 2025-08-04
    Snapshot date for the output table.

  • output_table_snapshot_date_name: str
    default: "snapshot_date"
    Name of the snapshot date column in the output table.

  • output_table_snapshot_date_as_timeseries_key: bool
    default: False
    Whether to add the snapshot date as a timeseries key in the output table (only applicable for DataBricks). If False, the snapshot date will be added as a regular primary key along with entity columns.

  • 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.

  • point_in_time: Union[datetime, str, NoneType]
    Optional point in time to use for computing the batch feature table. If None, the current time is used.

  • use_deployed_tile_tables: bool
    default: False
    Whether to use deployed tile tables for computing the batch feature table. If False, tiles will be computed on demand.

Examples

Compute batch features using a batch request table.

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

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