Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Enable Infra Creation During Materialization #147

Merged
merged 15 commits into from
Oct 22, 2024
18 changes: 18 additions & 0 deletions sdk/python/feast/infra/passthrough_provider.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging
from datetime import datetime, timedelta
from typing import Any, Callable, Dict, List, Mapping, Optional, Sequence, Tuple, Union

Expand Down Expand Up @@ -37,6 +38,8 @@
make_tzaware,
)

logger = logging.getLogger(__name__)

DEFAULT_BATCH_SIZE = 10_000


Expand Down Expand Up @@ -317,6 +320,21 @@ def materialize_single_feature_view(
or isinstance(feature_view, StreamFeatureView)
or isinstance(feature_view, FeatureView)
), f"Unexpected type for {feature_view.name}: {type(feature_view)}"

if getattr(config.online_store, "lazy_table_creation", False):
logger.info(
f"Online store {config.online_store.__class__.__name__} supports lazy table creation and it is enabled"
)

self.update_infra(
project=project,
tables_to_delete=[],
tables_to_keep=[feature_view],
entities_to_delete=[],
entities_to_keep=registry.list_entities(project=project),
partial=True,
)

task = MaterializationTask(
project=project,
feature_view=feature_view,
Expand Down
Loading