feast-dev / feast-dev/feast

Support variable window aggregation through ODFV

Open
#6,308 3 comments 0 reactions 0 assignees View on GitHub
kind/feature
Dominant language
Python
Stars
7.3k
Forks
1.4k
Avg merge
1d 21h
Merged PRs (30d)
15

Description

**Is your feature request related to a problem? Please describe.**
Currently, feast supports dynamic aggregation through ODFV from raw data source. For variable window aggregation, the features are independently computed so there is no raw source but aggregation is still being read / written.

**Describe the solution you'd like**
We want to allow users to not define raw data source but instead replace data source with new optional `input_schema` field to define raw data input type. For example, instead of passing in `txn_amount` from external feature view, it is submitted as `input_schema`. See example below:

```
@on_demand_feature_view(
input_schema=[
Field(name="txn_amount", dtype=Float64),
],
schema=[
Field(name="txn_count", dtype=Int64),
Field(name="total_txn_amount", dtype=Float64),
Field(name="avg_txn_amount", dtype=Float64),
],
aggregations=[
Aggregation(column="txn_amount", function="count", name="txn_count",
window=timedelta(days=30)),
Aggregation(column="txn_amount", function="sum", name="total_txn_amount",
window=timedelta(days=30)),
Aggregation(column="txn_amount", function="mean", name="avg_txn_amount",
window=timedelta(days=30)),
],
entities=[user],
write_to_online_store=True,
)
```
This allows dynamic systems like cassandra or iceberg that support time series data representations, to support variable window engines which support writing and reading to / from same source.

**Describe alternatives you've considered**
Using dummy source (confusing, needlessly complex), using aggregation on feature view (not supported)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.