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
Next Next commit
Added start_date & end_date range for historical data retrieval from …
…RemoteOfflineStore

Signed-off-by: Aniket Paluskar <apaluska@redhat.com>
  • Loading branch information
aniketpalu authored and ntkathole committed Oct 23, 2025
commit b8a8ab68077a2d3c25b35c49649fde8d97b66dfa
10 changes: 10 additions & 0 deletions sdk/python/feast/infra/offline_stores/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ def get_historical_features(
registry: BaseRegistry,
project: str,
full_feature_names: bool = False,
**kwargs,
) -> RemoteRetrievalJob:
assert isinstance(config.offline_store, RemoteOfflineStoreConfig)

Expand All @@ -218,6 +219,15 @@ def get_historical_features(
"full_feature_names": full_feature_names,
"name_aliases": name_aliases,
}

# Extract and serialize start_date/end_date for remote transmission
start_date = kwargs.get("start_date", None)
end_date = kwargs.get("end_date", None)

if start_date is not None:
api_parameters["start_date"] = start_date.isoformat()
if end_date is not None:
api_parameters["end_date"] = end_date.isoformat()

return RemoteRetrievalJob(
client=client,
Expand Down
12 changes: 12 additions & 0 deletions sdk/python/feast/offline_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,17 @@ def get_historical_features(self, command: dict, key: Optional[str] = None):
resource=feature_view, actions=[AuthzedAction.READ_OFFLINE]
)

# Extract and deserialize start_date/end_date if present
kwargs = {}
if "start_date" in command and command["start_date"] is not None:
kwargs["start_date"] = utils.make_tzaware(
datetime.fromisoformat(command["start_date"])
)
if "end_date" in command and command["end_date"] is not None:
kwargs["end_date"] = utils.make_tzaware(
datetime.fromisoformat(command["end_date"])
)

retJob = self.offline_store.get_historical_features(
config=self.store.config,
feature_views=feature_views,
Expand All @@ -457,6 +468,7 @@ def get_historical_features(self, command: dict, key: Optional[str] = None):
registry=self.store.registry,
project=project,
full_feature_names=full_feature_names,
**kwargs,
)

return retJob
Expand Down