Skip to content

featurebyte.SourceTable.preview

preview(
limit: int=10
) -> DataFrame

Description

Retrieve a preview of the source table / column.

Parameters

  • limit: int
    default: 10
    Maximum number of return rows.

Returns

  • DataFrame
    Preview rows of the data.

Raises

  • RecordRetrievalException
    Preview request failed.

Examples

Preview 3 rows of a source table.

>>> data_source = fb.FeatureStore.get("playground").get_data_source()
>>> source_table = data_source.get_source_table(
...     table_name="groceryinvoice",
...     database_name="spark_catalog",
...     schema_name="doctest_grocery",
... )
>>> source_table.preview(3)
                     GroceryInvoiceGuid                   GroceryCustomerGuid           Timestamp record_available_at  Amount
0  4fccfb1d-02b3-4047-87ab-4e5f910ccdd1  a7ada4a3-fd92-44e6-a232-175c90b1c939 2022-01-03 12:28:58 2022-01-03 13:01:00   10.68
1  9cf3c416-7b38-401e-adf6-1bd26650d1d6  a7ada4a3-fd92-44e6-a232-175c90b1c939 2022-01-03 16:32:15 2022-01-03 17:01:00   38.04
2  0a5b99b2-9ff1-452a-a06e-669e8ed4a9fa  a7ada4a3-fd92-44e6-a232-175c90b1c939 2022-01-07 16:20:04 2022-01-07 17:01:00    1.99