feast.infra.registry_stores package

Submodules

feast.infra.registry_stores.sql module

class feast.infra.registry_stores.sql.FeastMetadataKeys(value)[source]

Bases: enum.Enum

An enumeration.

LAST_UPDATED_TIMESTAMP = 'last_updated_timestamp'
PROJECT_UUID = 'project_uuid'
class feast.infra.registry_stores.sql.SqlRegistry(registry_config: Optional[feast.repo_config.RegistryConfig], repo_path: Optional[pathlib.Path])[source]

Bases: feast.registry.BaseRegistry

apply_data_source(data_source: feast.data_source.DataSource, project: str, commit: bool = True)[source]

Registers a single data source with Feast

Parameters
  • data_source – A data source that will be registered

  • project – Feast project that this data source belongs to

  • commit – Whether to immediately commit to the registry

apply_entity(entity: feast.entity.Entity, project: str, commit: bool = True)[source]

Registers a single entity with Feast

Parameters
  • entity – Entity that will be registered

  • project – Feast project that this entity belongs to

  • commit – Whether the change should be persisted immediately

apply_feature_service(feature_service: feast.feature_service.FeatureService, project: str, commit: bool = True)[source]

Registers a single feature service with Feast

Parameters
  • feature_service – A feature service that will be registered

  • project – Feast project that this entity belongs to

apply_feature_view(feature_view: feast.base_feature_view.BaseFeatureView, project: str, commit: bool = True)[source]

Registers a single feature view with Feast

Parameters
  • feature_view – Feature view that will be registered

  • project – Feast project that this feature view belongs to

  • commit – Whether the change should be persisted immediately

apply_materialization(feature_view: feast.feature_view.FeatureView, project: str, start_date: datetime.datetime, end_date: datetime.datetime, commit: bool = True)[source]

Updates materialization intervals tracked for a single feature view in Feast

Parameters
  • feature_view – Feature view that will be updated with an additional materialization interval tracked

  • project – Feast project that this feature view belongs to

  • start_date (datetime) – Start date of the materialization interval to track

  • end_date (datetime) – End date of the materialization interval to track

  • commit – Whether the change should be persisted immediately

apply_saved_dataset(saved_dataset: feast.saved_dataset.SavedDataset, project: str, commit: bool = True)[source]

Stores a saved dataset metadata with Feast

Parameters
  • saved_dataset – SavedDataset that will be added / updated to registry

  • project – Feast project that this dataset belongs to

  • commit – Whether the change should be persisted immediately

apply_user_metadata(project: str, feature_view: feast.base_feature_view.BaseFeatureView, metadata_bytes: Optional[bytes])[source]
apply_validation_reference(validation_reference: feast.saved_dataset.ValidationReference, project: str, commit: bool = True)[source]

Persist a validation reference

Parameters
  • validation_reference – ValidationReference that will be added / updated to registry

  • project – Feast project that this dataset belongs to

  • commit – Whether the change should be persisted immediately

commit()[source]

Commits the state of the registry cache to the remote registry store.

delete_data_source(name: str, project: str, commit: bool = True)[source]

Deletes a data source or raises an exception if not found.

Parameters
  • name – Name of data source

  • project – Feast project that this data source belongs to

  • commit – Whether the change should be persisted immediately

delete_entity(name: str, project: str, commit: bool = True)[source]

Deletes an entity or raises an exception if not found.

Parameters
  • name – Name of entity

  • project – Feast project that this entity belongs to

  • commit – Whether the change should be persisted immediately

delete_feature_service(name: str, project: str, commit: bool = True)[source]

Deletes a feature service or raises an exception if not found.

Parameters
  • name – Name of feature service

  • project – Feast project that this feature service belongs to

  • commit – Whether the change should be persisted immediately

delete_feature_view(name: str, project: str, commit: bool = True)[source]

Deletes a feature view or raises an exception if not found.

Parameters
  • name – Name of feature view

  • project – Feast project that this feature view belongs to

  • commit – Whether the change should be persisted immediately

delete_validation_reference(name: str, project: str, commit: bool = True)[source]

Deletes a validation reference or raises an exception if not found.

Parameters
  • name – Name of validation reference

  • project – Feast project that this object belongs to

  • commit – Whether the change should be persisted immediately

get_data_source(name: str, project: str, allow_cache: bool = False) feast.data_source.DataSource[source]

Retrieves a data source.

Parameters
  • name – Name of data source

  • project – Feast project that this data source belongs to

  • allow_cache – Whether to allow returning this data source from a cached registry

Returns

Returns either the specified data source, or raises an exception if none is found

get_entity(name: str, project: str, allow_cache: bool = False) feast.entity.Entity[source]

Retrieves an entity.

Parameters
  • name – Name of entity

  • project – Feast project that this entity belongs to

  • allow_cache – Whether to allow returning this entity from a cached registry

Returns

Returns either the specified entity, or raises an exception if none is found

get_feature_service(name: str, project: str, allow_cache: bool = False) feast.feature_service.FeatureService[source]

Retrieves a feature service.

Parameters
  • name – Name of feature service

  • project – Feast project that this feature service belongs to

  • allow_cache – Whether to allow returning this feature service from a cached registry

Returns

Returns either the specified feature service, or raises an exception if none is found

get_feature_view(name: str, project: str, allow_cache: bool = False) feast.feature_view.FeatureView[source]

Retrieves a feature view.

Parameters
  • name – Name of feature view

  • project – Feast project that this feature view belongs to

  • allow_cache – Allow returning feature view from the cached registry

Returns

Returns either the specified feature view, or raises an exception if none is found

get_infra(project: str, allow_cache: bool = False) feast.infra.infra_object.Infra[source]

Retrieves the stored Infra object.

Parameters
  • project – Feast project that the Infra object refers to

  • allow_cache – Whether to allow returning this entity from a cached registry

Returns

The stored Infra object.

get_on_demand_feature_view(name: str, project: str, allow_cache: bool = False) feast.on_demand_feature_view.OnDemandFeatureView[source]

Retrieves an on demand feature view.

Parameters
  • name – Name of on demand feature view

  • project – Feast project that this on demand feature view belongs to

  • allow_cache – Whether to allow returning this on demand feature view from a cached registry

Returns

Returns either the specified on demand feature view, or raises an exception if none is found

get_request_feature_view(name: str, project: str)[source]

Retrieves a request feature view.

Parameters
  • name – Name of request feature view

  • project – Feast project that this feature view belongs to

  • allow_cache – Allow returning feature view from the cached registry

Returns

Returns either the specified feature view, or raises an exception if none is found

get_saved_dataset(name: str, project: str, allow_cache: bool = False) feast.saved_dataset.SavedDataset[source]

Retrieves a saved dataset.

Parameters
  • name – Name of dataset

  • project – Feast project that this dataset belongs to

  • allow_cache – Whether to allow returning this dataset from a cached registry

Returns

Returns either the specified SavedDataset, or raises an exception if none is found

get_stream_feature_view(name: str, project: str, allow_cache: bool = False)[source]

Retrieves a stream feature view.

Parameters
  • name – Name of stream feature view

  • project – Feast project that this feature view belongs to

  • allow_cache – Allow returning feature view from the cached registry

Returns

Returns either the specified feature view, or raises an exception if none is found

get_user_metadata(project: str, feature_view: feast.base_feature_view.BaseFeatureView) Optional[bytes][source]
get_validation_reference(name: str, project: str, allow_cache: bool = False) feast.saved_dataset.ValidationReference[source]

Retrieves a validation reference.

Parameters
  • name – Name of dataset

  • project – Feast project that this dataset belongs to

  • allow_cache – Whether to allow returning this dataset from a cached registry

Returns

Returns either the specified ValidationReference, or raises an exception if none is found

list_data_sources(project: str, allow_cache: bool = False) List[feast.data_source.DataSource][source]

Retrieve a list of data sources from the registry

Parameters
  • project – Filter data source based on project name

  • allow_cache – Whether to allow returning data sources from a cached registry

Returns

List of data sources

list_entities(project: str, allow_cache: bool = False) List[feast.entity.Entity][source]

Retrieve a list of entities from the registry

Parameters
  • allow_cache – Whether to allow returning entities from a cached registry

  • project – Filter entities based on project name

Returns

List of entities

list_feature_services(project: str, allow_cache: bool = False) List[feast.feature_service.FeatureService][source]

Retrieve a list of feature services from the registry

Parameters
  • allow_cache – Whether to allow returning entities from a cached registry

  • project – Filter entities based on project name

Returns

List of feature services

list_feature_views(project: str, allow_cache: bool = False) List[feast.feature_view.FeatureView][source]

Retrieve a list of feature views from the registry

Parameters
  • allow_cache – Allow returning feature views from the cached registry

  • project – Filter feature views based on project name

Returns

List of feature views

list_on_demand_feature_views(project: str, allow_cache: bool = False) List[feast.on_demand_feature_view.OnDemandFeatureView][source]

Retrieve a list of on demand feature views from the registry

Parameters
  • project – Filter on demand feature views based on project name

  • allow_cache – Whether to allow returning on demand feature views from a cached registry

Returns

List of on demand feature views

list_project_metadata(project: str, allow_cache: bool = False) List[feast.project_metadata.ProjectMetadata][source]

Retrieves project metadata

Parameters
  • project – Filter metadata based on project name

  • allow_cache – Allow returning feature views from the cached registry

Returns

List of project metadata

list_request_feature_views(project: str, allow_cache: bool = False) List[feast.request_feature_view.RequestFeatureView][source]

Retrieve a list of request feature views from the registry

Parameters
  • allow_cache – Allow returning feature views from the cached registry

  • project – Filter feature views based on project name

Returns

List of request feature views

list_saved_datasets(project: str, allow_cache: bool = False) List[feast.saved_dataset.SavedDataset][source]

Retrieves a list of all saved datasets in specified project

Parameters
  • project – Feast project

  • allow_cache – Whether to allow returning this dataset from a cached registry

Returns

Returns the list of SavedDatasets

list_stream_feature_views(project: str, allow_cache: bool = False) List[feast.stream_feature_view.StreamFeatureView][source]

Retrieve a list of stream feature views from the registry

Parameters
  • project – Filter stream feature views based on project name

  • allow_cache – Whether to allow returning stream feature views from a cached registry

Returns

List of stream feature views

proto() feast.core.Registry_pb2.Registry[source]

Retrieves a proto version of the registry.

Returns

The registry proto object.

refresh(project: Optional[str])[source]

Refreshes the state of the registry cache by fetching the registry state from the remote registry store.

teardown()[source]
update_infra(infra: feast.infra.infra_object.Infra, project: str, commit: bool = True)[source]

Updates the stored Infra object.

Parameters
  • infra – The new Infra object to be stored.

  • project – Feast project that the Infra object refers to

  • commit – Whether the change should be persisted immediately

Module contents