Skip to content

featurebyte.SourceTable.create_batch_request_table

create_batch_request_table(
name: str,
columns: Optional[list[str]]=None,
columns_rename_mapping: Optional[dict[str, str]]=None
) -> BatchRequestTable

Description

Creates an BatchRequestTable from the SourceTable. When you specify the columns and the columns_rename_mapping parameters, make sure that the table has a column containing entity values with an accepted serving name.

Parameters

  • name: str
    Batch request table name.

  • columns: Optional[list[str]]
    Include only these columns when creating the batch request table. If None, all columns are included.

  • columns_rename_mapping: Optional[dict[str, str]]
    Rename columns in the source table using this mapping from old column names to new column names when creating the batch request table. If None, no columns are renamed.

Returns

  • BatchRequestTable

Examples

>>> data_source = fb.FeatureStore.get(<feature_store_name>).get_data_source()
>>> source_table = data_source.get_source_table(
...   database_name="<data_base_name>",
...   schema_name="<schema_name>",
...   table_name=<table_name>
... )
>>> batch_request_table = source_table.create_batch_request_table(
...   name="<batch_request_table_name>",
...   columns=[<entity_column_name>],
...   columns_rename_mapping={ <entity_column_name>: <entity_serving_name>, }
... )