OnlineStore
class.OnlineStoreConfig
class.OnlineStore
in a feature repo's feature_store.yaml
file.OnlineStore
class.sdk/python/feast/infra/online_stores/contrib/
.make test-python-integration
) is setup to run all tests against the online store and pass.OWNERS
/ CODEOWNERS
file).update
and teardown
update
is invoked when users run feast apply
as a CLI command, or the FeatureStore.apply()
sdk method.update
method should be used to perform any operations necessary before data can be written to or read from the store. The update
method can be used to create MySQL tables in preparation for reads and writes to new feature views.teardown
is invoked when users run feast teardown
or FeatureStore.teardown()
.teardown
method should be used to perform any clean-up operations. teardown
can be used to drop MySQL indices and tables corresponding to the feature views being deleted.online_write_batch
and online_read
.online_write_batch
is invoked when running materialization (using the feast materialize
or feast materialize-incremental
commands, or the corresponding FeatureStore.materialize()
method.online_read
is invoked when reading values from the online store using the FeatureStore.get_online_features()
method.source_datatype_to_feast_value_type
and get_column_names_and_types
in your DataSource
class.source_datatype_to_feast_value_type
is used to convert your DataSource's datatypes to feast value types.get_column_names_and_types
retrieves the column names and corresponding datasource types.sdk/python/feast/type_map.py
.FeastConfigBaseModel
class, which is defined here.FeastConfigBaseModel
is 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.type
field, which contains the fully qualified class name of its corresponding OnlineStore class.Config
suffix.feature_store.yaml
as follows:config: RepoConfig
parameter which is passed into all the methods of the OnlineStore interface, specifically at the config.online_store
field of the config
parameter.feature_store.yaml
file, specifically in the online_store
field. The value specified should be the fully qualified class name of the OnlineStore.feature_store.yaml
:type
of the online store class as the value for the online_store
.OnlineStore
class 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_CONFIGS
variable defined in sdk/python/tests/integration/feature_repos/repo_configuration.py
which stores different online store classes for testing.FULL_REPO_CONFIGS
variable, and point Feast to that file by setting the environment variable FULL_REPO_CONFIGS_MODULE
to point to that file.FULL_REPO_CONFIGS_MODULE
looks something like this:OnlineStoreCreator
and replace the None
object above with your OnlineStoreCreator
class. You should make this class available to pytest through the PYTEST_PLUGINS
environment variable.OnlineStoreCreator
is shown below:FULL_REPO_CONFIGS_MODULE
environment variable. Add PYTEST_PLUGINS
if 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 -k
option.sdk/python/setup.py
under a new <ONLINE_STORE>_REQUIRED
list 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/reference/online-stores/
.docs/reference/online-stores/README.md
and 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.yaml
file in order to create the datasource.