OnlineStorein a feature repo's
updateis invoked when users run
feast applyas a CLI command, or the
updatemethod should be used to perform any operations necessary before data can be written to or read from the store. The
updatemethod can be used to create MySQL tables in preparation for reads and writes to new feature views.
teardownis invoked when users run
teardownmethod should be used to perform any clean-up operations.
teardowncan be used to drop MySQL indices and tables corresponding to the feature views being deleted.
online_write_batchis invoked when running materialization (using the
feast materialize-incrementalcommands, or the corresponding
online_readis invoked when reading values from the online store using the
FeastConfigBaseModelclass, which is defined here.
FeastConfigBaseModelis a pydantic class, which parses yaml configuration into python objects. Pydantic also allows the model classes to define validators for the config classes, to make sure that the config classes are correctly defined.
typefield, which contains the fully qualified class name of its corresponding OnlineStore class.
config: RepoConfigparameter which is passed into all the methods of the OnlineStore interface, specifically at the
config.online_storefield of the
feature_store.yamlfile, specifically in the
online_storefield. The value specified should be the fully qualified class name of the OnlineStore.
typeof the online store class as the value for the
OnlineStoreclass in a separate repo, you can still test your implementation against the Feast test suite, as long as you have Feast as a submodule in your repo. In the Feast submodule, we can run all the unit tests with:
FULL_REPO_CONFIGSvariable defined in
sdk/python/tests/integration/feature_repos/repo_configuration.py. To overwrite these configurations, you can simply create your own file that contains a
FULL_REPO_CONFIGS, and point Feast to that file by setting the environment variable
FULL_REPO_CONFIGS_MODULEto point to that file. In this repo, the file that overwrites
feast_custom_online_store/feast_tests.py, so you would run