Skip to content

featurebyte.DataSource.list_source_tables

list_source_tables(
database_name: Union[str, NoneType]=None,
schema_name: Union[str, NoneType]=None
) -> List[str]

Description

Lists the tables present in a particular database schema of the data source.

Parameters

  • database_name: Union[str, NoneType]
    Name of database.

  • schema_name: Union[str, NoneType]
    Name of schema.

Returns

  • List[str]
    List of tables.

Note: Tables with names that begins with __ are excluded.

Raises

  • RecordRetrievalException
    Failed to retrieve database table list

Examples

>>> data_source = fb.FeatureStore.get("playground").get_data_source()
>>> data_source.list_source_tables(
...     database_name="spark_catalog",
...     schema_name="doctest_grocery",
... )[:3]
['grocerycustomer', 'groceryinvoice', 'groceryproduct']