DataSource

A DataSource object represents a collection of source tables that the feature store can access.

This object is obtained from the FeatureStore object it is linked to using the get_data_source() method:

feature_store = fb.FeatureStore.get("playground")
data_source = feature_store.get_data_source()

Follow below steps to access the source tables available in the data source:

  1. Retrieve the list of databases in the data source using the list_databases() method:
    ds.list_databases()
    
  2. Obtain the list of schemas within the desired database using the list_schemas() method:
    ds.list_schemas(database_name='spark_catalog')
    
  3. Access the list of tables contained in the selected schema using the list_source_tables() method:
    ds.list_source_tables(database_name='spark_catalog', schema_name='grocery')
    
  4. Obtain a SourceTable object using the get_source_table() method:
    source_table = ds.get_source_table(
        database_name="spark_catalog",
        schema_name="GROCERY",
        table_name="GROCERYCUSTOMER"
    )