feast.infra.online_stores.contrib package



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]

Read feature values given an Entity Key. This is a low level interface, not expected to be used by the users directly.

  • config – The RepoConfig for the current FeatureStore.

  • table – Feast FeatureView

  • entity_keys – a list of entity keys that should be read from the FeatureStore.

  • requested_features – (Optional) A subset of the features that should be read from the FeatureStore.


Data is returned as a list, one item per entity key in the original order as the entity_keys argument. Each item in the list is a tuple of event_ts for the row, and the feature data as a dict from feature names to values. Values are returned as Value proto message.

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]

Write a batch of feature rows to the online store. This is a low level interface, not expected to be used by the users directly.

If a tz-naive timestamp is passed to this method, it should be assumed to be UTC by implementors.

  • config – The RepoConfig for the current FeatureStore.

  • table – Feast FeatureView

  • data – a list of quadruplets containing Feature data. Each quadruplet contains an Entity Key,

  • values (a dict containing feature) –

  • row (an event timestamp for the) –

  • and

  • exists. (the created timestamp for the row if it) –

  • progress – Optional function to be called once every mini-batch of rows is written to

  • progress. (the online store. Can be used to display) –

teardown(config: feast.repo_config.RepoConfig, tables: Sequence[feast.feature_view.FeatureView], entities: Sequence[feast.entity.Entity])[source]
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]
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: pydantic.types.StrictStr = None, sslkey_path: pydantic.types.StrictStr = None, sslcert_path: pydantic.types.StrictStr = None, sslrootcert_path: pydantic.types.StrictStr = None, type: Literal['postgres'] = 'postgres')[source]

Bases: feast.infra.utils.postgres.postgres_config.PostgreSQLConfig

type: Literal['postgres']

Module contents