OnlineStorein a feature repo's
make test-python-integration) is setup to run all tests against the online store and pass.
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
source_datatype_to_feast_value_typeis used to convert your DataSource's datatypes to feast value types.
get_column_names_and_typesretrieves the column names and corresponding datasource types.
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.
FULL_REPO_CONFIGSvariable defined in
sdk/python/tests/integration/feature_repos/repo_configuration.pywhich stores different online store classes for testing.
FULL_REPO_CONFIGSvariable, and point Feast to that file by setting the environment variable
FULL_REPO_CONFIGS_MODULEto point to that file.
FULL_REPO_CONFIGS_MODULElooks something like this:
OnlineStoreCreatorand replace the
Noneobject above with your
OnlineStoreCreatorclass. You should make this class available to pytest through the
OnlineStoreCreatoris shown below:
FULL_REPO_CONFIGS_MODULEenvironment variable. Add
PYTEST_PLUGINSif pytest is having trouble loading your
DataSourceCreator. You can remove certain tests that are not relevant or still do not work for your datastore using the
sdk/python/setup.pyunder a new
<ONLINE_STORE>_REQUIREDlist with the packages and add it to the setup script so that if your online store is needed, users can install the necessary python packages. These packages should be defined as extras so that they are not installed by users by default.
docs/SUMMARY.md. Add a new markdown document to document your online store functionality similar to how the other online stores are documented.
feature_store.yamlfile in order to create the datasource.