Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
updated feature server
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
  • Loading branch information
franciscojavierarceo committed Sep 23, 2025
commit 30ac5add520a5e235667ec7ebeb0ee418b048198
17 changes: 15 additions & 2 deletions sdk/python/feast/feature_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import time
import traceback
from contextlib import asynccontextmanager
from datetime import datetime
from importlib import resources as importlib_resources
from typing import Any, Dict, List, Optional, Union

Expand Down Expand Up @@ -76,6 +77,7 @@ class MaterializeRequest(BaseModel):
start_ts: str
end_ts: str
feature_views: Optional[List[str]] = None
disable_event_timestamp: bool = False


class MaterializeIncrementalRequest(BaseModel):
Expand Down Expand Up @@ -432,10 +434,21 @@ def materialize(request: MaterializeRequest) -> None:
resource=_get_feast_object(feature_view, True),
actions=[AuthzedAction.WRITE_ONLINE],
)

if request.disable_event_timestamp:
# Query all available data and use current datetime as event timestamp
now = datetime.now()
start_date = datetime(1970, 1, 1) # Beginning of time to capture all historical data
end_date = now
else:
start_date = utils.make_tzaware(parser.parse(request.start_ts))
end_date = utils.make_tzaware(parser.parse(request.end_ts))

store.materialize(
utils.make_tzaware(parser.parse(request.start_ts)),
utils.make_tzaware(parser.parse(request.end_ts)),
start_date,
end_date,
request.feature_views,
disable_event_timestamp=request.disable_event_timestamp,
)

@app.post("/materialize-incremental", dependencies=[Depends(inject_user_details)])
Expand Down
2 changes: 1 addition & 1 deletion sdk/python/feast/infra/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def materialize_single_feature_view(
registry: The registry for the current feature store.
project: Feast project to which the objects belong.
tqdm_builder: A function to monitor the progress of materialization.
disable_event_timestamp: If True, uses current datetime for materialization instead of event timestamps.
disable_event_timestamp: If True, materializes all available data using current datetime as event timestamp instead of source event timestamps.
"""
pass

Expand Down