Skip to content

featurebyte.ObservationTable.upload

upload(
file_path: Union[str, Path],
name: str,
purpose: Optional[Purpose]=None,
primary_entities: Optional[List[str]]=None,
target_column: Optional[str]=None
) -> ObservationTable

Description

Upload a file to create an observation table. This file can either be a CSV or Parquet file.

Parameters

  • file_path: Union[str, Path]
    Path to file to upload. The file path should end in the appropriate .csv or .parquet file extension.

  • name: str
    Name of the observation table to create.

  • purpose: Optional[Purpose]
    Purpose of the observation table.

  • primary_entities: Optional[List[str]]
    List of primary entities for the observation table.

  • target_column: Optional[str]
    Name of the column in the observation table that stores the target values. The target column name must match an existing target namespace in the catalog. The data type and primary entities must match the those in the target namespace.

Returns

  • ObservationTable

Examples

>>> observation_table = ObservationTable.upload(
...     file_path="path/to/csv/file.csv",
...     name="observation_table_name",
...     purpose=fb.Purpose.PREVIEW,
...     primary_entities=["entity_name_1"],
... )