Data model
Aggregated Feature: filtered rollups over time windows.
Compute sum, min, max, count, and grouped rollups per entity, filtered by dimension, over sliding or tumbling windows — served directly instead of rebuilt by a stream job for every new feature.
What it is
The math over a window, computed inside the store.
An Aggregated Feature turns an entity's raw events into a number — or a small set of grouped numbers — over a time window, without you shipping the events anywhere. Ask for sum, min, max, count, or rate over the last 15 minutes or 7 days, optionally filtered by dimension and grouped by another.
Each entity keeps its own sparse aggregate state, so the model scales to millions of keys without a stream job per feature. Results are fresh at request time: they reflect the latest event, not the next batch cycle.
That freshness plus request-time filtering is the edge over a nightly pipeline or a pre-computed cube — new features are a read, not a new job.
In practice
Read a window; filter and group in the same call.
f = ts.window(
table="checkout_events",
entity="user_42",
range="15m",
metrics=["count", "sum(amount_usd)"],
)
f = ts.window(
table="chargebacks",
entity="merchant_3",
range="7d",
group_by=["channel"],
metrics=["count", "sum(amount)"],
)
When to use it
When a decision needs a fresh number over recent events.
Reach for an Aggregated Feature when you would otherwise stand up a stream job or query a warehouse just to get one windowed statistic per entity at request time.
| Use case | Aggregate | Why it fits |
|---|---|---|
| Risk & fraud features | count / sum over minutes, filtered by dimension | Fresh signal at scoring time across millions of accounts. |
| Campaign spend windows | sum(amount) grouped by channel over a day | Enforces budgets and pacing without a spend pipeline. |
| Recommendation freshness | count / rate over the recent window | Reflects the latest interactions, not last night's batch. |
| Operational health | rate / max over a rolling window | Per-entity metrics served straight from the store. |
Related models