You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit fdeee98
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/getting-started/concepts/feature-view.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,7 @@ Feature views consist of:
26
26
* (optional) `owner`: the email of the primary maintainer
27
27
* (optional) `org`: the organizational unit that owns the feature view (e.g. `"ads"`, `"search"`); useful for grouping feature views by team or product area
28
28
* (optional) a TTL, which limits how far back Feast will look when generating historical datasets
29
+
* (optional) `online_config`, which declares online retention and write semantics
29
30
* (optional) `enable_validation=True`, which enables schema validation during materialization (see [Schema Validation](#schema-validation) below)
30
31
31
32
Feature views allow Feast to model your existing feature data in a consistent way in both an offline (training) and online (serving) environment. Feature views generally contain features that are properties of a specific object, in which case that object is defined as an entity and included in the feature view.
@@ -59,6 +60,33 @@ Feature views are used during
59
60
* Loading of feature values into an online store. Feature views determine the storage schema in the online store. Feature values can be loaded from batch sources or from [stream sources](../../reference/data-sources/push.md).
60
61
* Retrieval of features from the online store. Feature views provide the schema definition to Feast in order to look up features from the online store.
61
62
63
+
## Online retention configuration
64
+
65
+
`OnlineConfig` declares whether a feature view uses the current latest-value model or a bounded sequence of historical values per entity. Sequence mode requires append writes and a positive maximum length. An optional maximum age adds a second retention limit.
66
+
67
+
```python
68
+
from datetime import timedelta
69
+
70
+
from feast import FeatureView, OnlineConfig
71
+
72
+
user_interactions = FeatureView(
73
+
name="user_interactions",
74
+
entities=[user],
75
+
schema=[...],
76
+
source=interactions_source,
77
+
online_config=OnlineConfig(
78
+
mode="sequence",
79
+
max_length=50,
80
+
max_age=timedelta(days=90),
81
+
write_mode="append",
82
+
),
83
+
)
84
+
```
85
+
86
+
{% hint style="warning" %}
87
+
Sequence configuration is currently an experimental registry contract. Online stores continue to use their existing latest-value behavior until they explicitly implement sequence append, retrieval, and eviction support.
88
+
{% endhint %}
89
+
62
90
## Feature views without entities
63
91
64
92
If a feature view contains features that are not related to a specific entity, the feature view can be defined without entities (only timestamps are needed for this feature view).
0 commit comments