diff --git a/sdk/python/feast/expediagroup/provider/expedia.py b/sdk/python/feast/expediagroup/provider/expedia.py index b242e00437..4eb2c56d06 100644 --- a/sdk/python/feast/expediagroup/provider/expedia.py +++ b/sdk/python/feast/expediagroup/provider/expedia.py @@ -68,8 +68,19 @@ def update_infra( entities_to_delete: Sequence[Entity], entities_to_keep: Sequence[Entity], partial: bool, + materialization_update: bool = False, ): if self.online_store: + if self.online_store.type == "scylladb" and materialization_update: + self.online_store.update( + config=self.repo_config, + tables_to_delete=tables_to_delete, + tables_to_keep=tables_to_keep, + entities_to_keep=entities_to_keep, + entities_to_delete=entities_to_delete, + partial=partial, + ) + if tables_to_delete: logger.info( f"Data associated to {[feature_view.name for feature_view in tables_to_delete]} feature views will be deleted from the online store based on ttl defined if the entities are not shared with other feature views" diff --git a/sdk/python/feast/feature_store.py b/sdk/python/feast/feature_store.py index 405fa894d4..522db65164 100644 --- a/sdk/python/feast/feature_store.py +++ b/sdk/python/feast/feature_store.py @@ -1256,7 +1256,7 @@ def materialize_incremental( feature_views ) - if getattr(self.config.online_store, "lazy_table_creation", False): + if getattr(self.config.online_store, "lazy_table_creation", False) and self.config.provider == "expedia": # feature_views_to_delete = self._get_feature_views_to_delete() # don't delete any tables for now @@ -1267,6 +1267,7 @@ def materialize_incremental( entities_to_delete=[], entities_to_keep=[], partial=True, + materialization_update=True, ) _print_materialization_log( @@ -1365,7 +1366,7 @@ def materialize( feature_views ) - if getattr(self.config.online_store, "lazy_table_creation", False): + if getattr(self.config.online_store, "lazy_table_creation", False) and self.config.provider == "expedia": # feature_views_to_delete = self._get_feature_views_to_delete() # don't delete any tables for now @@ -1376,6 +1377,7 @@ def materialize( entities_to_delete=[], entities_to_keep=[], partial=True, + materialization_update=True, ) _print_materialization_log( diff --git a/sdk/python/feast/infra/online_stores/contrib/cassandra_online_store/cassandra_online_store.py b/sdk/python/feast/infra/online_stores/contrib/cassandra_online_store/cassandra_online_store.py index d59b4e1efd..ffae6babe1 100644 --- a/sdk/python/feast/infra/online_stores/contrib/cassandra_online_store/cassandra_online_store.py +++ b/sdk/python/feast/infra/online_stores/contrib/cassandra_online_store/cassandra_online_store.py @@ -467,13 +467,6 @@ def update( """ project = config.project - if getattr(config.online_store, "lazy_table_creation", False): - logger.info( - f"Lazy table creation enabled. Skipping table creation for {project} online store." - ) - # create tables during materialization - return - for table in tables_to_keep: self._create_table(config, project, table) for table in tables_to_delete: