Skip to content

Support variable window aggregation through ODFV #6308

@nquinn408

Description

@nquinn408

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions