feast.infra.materialization.lambda package

Submodules

feast.infra.materialization.lambda.app module

feast.infra.materialization.lambda.app.handler(event, context)[source]

Provide an event that contains the following keys:

  • operation: one of the operations in the operations dict below

  • tableName: required for operations that interact with DynamoDB

  • payload: a parameter to pass to the operation being performed

feast.infra.materialization.lambda.lambda_engine module

class feast.infra.materialization.lambda.lambda_engine.LambdaMaterializationEngine(*, repo_config: feast.repo_config.RepoConfig, offline_store: feast.infra.offline_stores.offline_store.OfflineStore, online_store: feast.infra.online_stores.online_store.OnlineStore, **kwargs)[source]

Bases: feast.infra.materialization.batch_materialization_engine.BatchMaterializationEngine

WARNING: This engine should be considered “Alpha” functionality.

materialize(registry, tasks: List[feast.infra.materialization.batch_materialization_engine.MaterializationTask]) List[feast.infra.materialization.batch_materialization_engine.MaterializationJob][source]

Materialize data from the offline store to the online store for this feature repo. :param registry: The feast registry containing the applied feature views. :param tasks: A list of individual materialization tasks.

Returns

A list of materialization jobs representing each task.

teardown_infra(project: str, fvs: Sequence[Union[feast.batch_feature_view.BatchFeatureView, feast.stream_feature_view.StreamFeatureView, feast.feature_view.FeatureView]], entities: Sequence[feast.entity.Entity])[source]

This method ensures that any infrastructure or resources set up by ``update()``are torn down.

update(project: str, views_to_delete: Sequence[Union[feast.batch_feature_view.BatchFeatureView, feast.stream_feature_view.StreamFeatureView, feast.feature_view.FeatureView]], views_to_keep: Sequence[Union[feast.batch_feature_view.BatchFeatureView, feast.stream_feature_view.StreamFeatureView, feast.feature_view.FeatureView]], entities_to_delete: Sequence[feast.entity.Entity], entities_to_keep: Sequence[feast.entity.Entity])[source]

This method ensures that any necessary infrastructure or resources needed by the engine are set up ahead of materialization.

class feast.infra.materialization.lambda.lambda_engine.LambdaMaterializationEngineConfig(*, type: Literal['lambda'] = 'lambda', materialization_image: pydantic.types.StrictStr, lambda_role: pydantic.types.StrictStr)[source]

Bases: feast.repo_config.FeastConfigBaseModel

Batch Materialization Engine config for lambda based engine

lambda_role: pydantic.types.StrictStr

Role that should be used by the materialization lambda

materialization_image: pydantic.types.StrictStr

The URI of a container image in the Amazon ECR registry, which should be used for materialization.

type: Literal['lambda']

Type selector

class feast.infra.materialization.lambda.lambda_engine.LambdaMaterializationJob(job_id: str, status: feast.infra.materialization.batch_materialization_engine.MaterializationJobStatus)[source]

Bases: feast.infra.materialization.batch_materialization_engine.MaterializationJob

error() Optional[BaseException][source]
job_id() str[source]
should_be_retried() bool[source]
status() feast.infra.materialization.batch_materialization_engine.MaterializationJobStatus[source]
task: feast.infra.materialization.batch_materialization_engine.MaterializationTask
url() Optional[str][source]

Module contents

class feast.infra.materialization.lambda.LambdaMaterializationEngine(*, repo_config: feast.repo_config.RepoConfig, offline_store: feast.infra.offline_stores.offline_store.OfflineStore, online_store: feast.infra.online_stores.online_store.OnlineStore, **kwargs)[source]

Bases: feast.infra.materialization.batch_materialization_engine.BatchMaterializationEngine

WARNING: This engine should be considered “Alpha” functionality.

materialize(registry, tasks: List[feast.infra.materialization.batch_materialization_engine.MaterializationTask]) List[feast.infra.materialization.batch_materialization_engine.MaterializationJob][source]

Materialize data from the offline store to the online store for this feature repo. :param registry: The feast registry containing the applied feature views. :param tasks: A list of individual materialization tasks.

Returns

A list of materialization jobs representing each task.

teardown_infra(project: str, fvs: Sequence[Union[feast.batch_feature_view.BatchFeatureView, feast.stream_feature_view.StreamFeatureView, feast.feature_view.FeatureView]], entities: Sequence[feast.entity.Entity])[source]

This method ensures that any infrastructure or resources set up by ``update()``are torn down.

update(project: str, views_to_delete: Sequence[Union[feast.batch_feature_view.BatchFeatureView, feast.stream_feature_view.StreamFeatureView, feast.feature_view.FeatureView]], views_to_keep: Sequence[Union[feast.batch_feature_view.BatchFeatureView, feast.stream_feature_view.StreamFeatureView, feast.feature_view.FeatureView]], entities_to_delete: Sequence[feast.entity.Entity], entities_to_keep: Sequence[feast.entity.Entity])[source]

This method ensures that any necessary infrastructure or resources needed by the engine are set up ahead of materialization.

class feast.infra.materialization.lambda.LambdaMaterializationEngineConfig(*, type: Literal['lambda'] = 'lambda', materialization_image: pydantic.types.StrictStr, lambda_role: pydantic.types.StrictStr)[source]

Bases: feast.repo_config.FeastConfigBaseModel

Batch Materialization Engine config for lambda based engine

lambda_role: pydantic.types.StrictStr

Role that should be used by the materialization lambda

materialization_image: pydantic.types.StrictStr

The URI of a container image in the Amazon ECR registry, which should be used for materialization.

type: Literal['lambda']

Type selector

class feast.infra.materialization.lambda.LambdaMaterializationJob(job_id: str, status: feast.infra.materialization.batch_materialization_engine.MaterializationJobStatus)[source]

Bases: feast.infra.materialization.batch_materialization_engine.MaterializationJob

error() Optional[BaseException][source]
job_id() str[source]
should_be_retried() bool[source]
status() feast.infra.materialization.batch_materialization_engine.MaterializationJobStatus[source]
task: feast.infra.materialization.batch_materialization_engine.MaterializationTask
url() Optional[str][source]