feast.infra.online_stores.contrib package
Subpackages
Submodules
feast.infra.online_stores.contrib.cassandra_repo_configuration module
feast.infra.online_stores.contrib.hbase_repo_configuration module
feast.infra.online_stores.contrib.postgres module
- class feast.infra.online_stores.contrib.postgres.PostgreSQLOnlineStore[source]
Bases:
feast.infra.online_stores.online_store.OnlineStore
- online_read(config: feast.repo_config.RepoConfig, table: feast.feature_view.FeatureView, entity_keys: List[feast.types.EntityKey_pb2.EntityKey], requested_features: Optional[List[str]] = None) List[Tuple[Optional[datetime.datetime], Optional[Dict[str, feast.types.Value_pb2.Value]]]] [source]
Reads features values for the given entity keys.
- Parameters
config – The config for the current feature store.
table – The feature view whose feature values should be read.
entity_keys – The list of entity keys for which feature values should be read.
requested_features – The list of features that should be read.
- Returns
A list of the same length as entity_keys. Each item in the list is a tuple where the first item is the event timestamp for the row, and the second item is a dict mapping feature names to values, which are returned in proto format.
- online_write_batch(config: feast.repo_config.RepoConfig, table: feast.feature_view.FeatureView, data: List[Tuple[feast.types.EntityKey_pb2.EntityKey, Dict[str, feast.types.Value_pb2.Value], datetime.datetime, Optional[datetime.datetime]]], progress: Optional[Callable[[int], Any]]) None [source]
Writes a batch of feature rows to the online store.
If a tz-naive timestamp is passed to this method, it is assumed to be UTC.
- Parameters
config – The config for the current feature store.
table – Feature view to which these feature rows correspond.
data – A list of quadruplets containing feature data. Each quadruplet contains an entity key, a dict containing feature values, an event timestamp for the row, and the created timestamp for the row if it exists.
progress – Function to be called once a batch of rows is written to the online store, used to show progress.
- teardown(config: feast.repo_config.RepoConfig, tables: Sequence[feast.feature_view.FeatureView], entities: Sequence[feast.entity.Entity])[source]
Tears down all cloud resources for the specified set of Feast objects.
- Parameters
config – The config for the current feature store.
tables – Feature views whose corresponding infrastructure should be deleted.
entities – Entities whose corresponding infrastructure should be deleted.
- update(config: feast.repo_config.RepoConfig, tables_to_delete: Sequence[feast.feature_view.FeatureView], tables_to_keep: Sequence[feast.feature_view.FeatureView], entities_to_delete: Sequence[feast.entity.Entity], entities_to_keep: Sequence[feast.entity.Entity], partial: bool)[source]
Reconciles cloud resources with the specified set of Feast objects.
- Parameters
config – The config for the current feature store.
tables_to_delete – Feature views whose corresponding infrastructure should be deleted.
tables_to_keep – Feature views whose corresponding infrastructure should not be deleted, and may need to be updated.
entities_to_delete – Entities whose corresponding infrastructure should be deleted.
entities_to_keep – Entities whose corresponding infrastructure should not be deleted, and may need to be updated.
partial – If true, tables_to_delete and tables_to_keep are not exhaustive lists, so infrastructure corresponding to other feature views should be not be touched.
- class feast.infra.online_stores.contrib.postgres.PostgreSQLOnlineStoreConfig(*, host: pydantic.types.StrictStr, port: int = 5432, database: pydantic.types.StrictStr, db_schema: pydantic.types.StrictStr = 'public', user: pydantic.types.StrictStr, password: pydantic.types.StrictStr, sslmode: Optional[pydantic.types.StrictStr] = None, sslkey_path: Optional[pydantic.types.StrictStr] = None, sslcert_path: Optional[pydantic.types.StrictStr] = None, sslrootcert_path: Optional[pydantic.types.StrictStr] = None, type: Literal['postgres'] = 'postgres')[source]
Bases:
feast.infra.utils.postgres.postgres_config.PostgreSQLConfig
- type: Literal['postgres']