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
**Option 3: Simple materialization without timestamps**
126
+
```commandline
127
+
feast materialize --disable-event-timestamp
128
+
```
129
+
130
+
The `--disable-event-timestamp` flag allows you to materialize all available feature data using the current datetime as the event timestamp, without needing to specify start and end timestamps. This is useful when your source data lacks proper event timestamp columns.
131
+
117
132
```commandline
118
133
Materializing feature view driver_hourly_stats from 2021-04-14 to 2021-04-15 done!
Feast uses online stores to serve features at low latency.
4
-
Feature values are loaded from data sources into the online store through _materialization_, which can be triggered through the `materialize` command.
5
-
6
-
The storage schema of features within the online store mirrors that of the original data source.
7
-
One key difference is that for each [entity key](../concepts/entity.md), only the latest feature values are stored.
8
-
No historical values are stored.
9
-
10
-
Here is an example batch data source:
11
-
12
-

13
-
14
-
Once the above data source is materialized into Feast (using `feast materialize`), the feature values will be stored as follows:
15
-
16
-

17
-
1
+
# Online store
2
+
3
+
Feast uses online stores to serve features at low latency.
4
+
Feature values are loaded from data sources into the online store through _materialization_, which can be triggered through the `materialize` command (either with specific timestamps or using `--disable-event-timestamp` to materialize all data with current timestamps).
5
+
6
+
The storage schema of features within the online store mirrors that of the original data source.
7
+
One key difference is that for each [entity key](../concepts/entity.md), only the latest feature values are stored.
8
+
No historical values are stored.
9
+
10
+
Here is an example batch data source:
11
+
12
+

13
+
14
+
Once the above data source is materialized into Feast (using `feast materialize` with timestamps or `feast materialize --disable-event-timestamp`), the feature values will be stored as follows:
15
+
16
+

17
+
18
18
Features can also be written directly to the online store via [push sources](../../reference/data-sources/push.md) .
Copy file name to clipboardExpand all lines: docs/getting-started/components/overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@
7
7
***Create Batch Features:** ELT/ETL systems like Spark and SQL are used to transform data in the batch store.
8
8
***Create Stream Features:** Stream features are created from streaming services such as Kafka or Kinesis, and can be pushed directly into Feast via the [Push API](../../reference/data-sources/push.md).
9
9
***Feast Apply:** The user (or CI) publishes versioned controlled feature definitions using `feast apply`. This CLI command updates infrastructure and persists definitions in the object store registry.
10
-
***Feast Materialize:** The user (or scheduler) executes `feast materialize` which loads features from the offline store into the online store.
10
+
***Feast Materialize:** The user (or scheduler) executes `feast materialize`(with timestamps or `--disable-event-timestamp` to materialize all data with current timestamps) which loads features from the offline store into the online store.
11
11
***Model Training:** A model training pipeline is launched. It uses the Feast Python SDK to retrieve a training dataset that can be used for training models.
12
12
***Get Historical Features:** Feast exports a point-in-time correct training dataset based on the list of features and entity dataframe provided by the model training pipeline.
13
13
***Deploy Model:** The trained model binary (and list of features) are deployed into a model serving system. This step is not executed by Feast.
Copy file name to clipboardExpand all lines: docs/getting-started/quickstart.md
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -499,13 +499,19 @@ print(training_df.head())
499
499
We now serialize the latest values of features since the beginning of time to prepare for serving. Note, `materialize_incremental` serializes all new features since the last `materialize` call, or since the time provided minus the `ttl` timedelta. In this case, this will be `CURRENT_TIME - 1 day` (`ttl` was set on the `FeatureView` instances in [feature_repo/feature_repo/example_repo.py](feature_repo/feature_repo/example_repo.py)).
500
500
501
501
{% tabs %}
502
-
{% tab title="Bash" %}
502
+
{% tab title="Bash (with timestamp)" %}
503
503
```bash
504
504
CURRENT_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S")
505
505
506
506
feast materialize-incremental $CURRENT_TIME
507
507
```
508
508
{% endtab %}
509
+
{% tab title="Bash (simple)" %}
510
+
```bash
511
+
# Alternative: Materialize all data using current timestamp (for data without event timestamps)
The `--disable-event-timestamp` flag is useful when your source data lacks event timestamp columns, allowing you to materialize all available data using the current datetime as the event timestamp.
178
+
167
179
```text
168
180
Materializing 1 feature views from 2020-01-01 to 2022-01-01
Copy file name to clipboardExpand all lines: docs/reference/feature-servers/python-feature-server.md
+46Lines changed: 46 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -200,6 +200,52 @@ requests.post(
200
200
data=json.dumps(push_data))
201
201
```
202
202
203
+
### Materializing features
204
+
205
+
The Python feature server also exposes an endpoint for materializing features from the offline store to the online store.
206
+
207
+
**Standard materialization with timestamps:**
208
+
```bash
209
+
curl -X POST "http://localhost:6566/materialize" -d '{
210
+
"start_ts": "2021-01-01T00:00:00",
211
+
"end_ts": "2021-01-02T00:00:00",
212
+
"feature_views": ["driver_hourly_stats"]
213
+
}'| jq
214
+
```
215
+
216
+
**Materialize all data without event timestamps:**
217
+
```bash
218
+
curl -X POST "http://localhost:6566/materialize" -d '{
219
+
"feature_views": ["driver_hourly_stats"],
220
+
"disable_event_timestamp": true
221
+
}'| jq
222
+
```
223
+
224
+
When `disable_event_timestamp` is set to `true`, the `start_ts` and `end_ts` parameters are not required, and all available data is materialized using the current datetime as the event timestamp. This is useful when your source data lacks proper event timestamp columns.
225
+
226
+
Or from Python:
227
+
```python
228
+
import json
229
+
import requests
230
+
231
+
# Standard materialization
232
+
materialize_data = {
233
+
"start_ts": "2021-01-01T00:00:00",
234
+
"end_ts": "2021-01-02T00:00:00",
235
+
"feature_views": ["driver_hourly_stats"]
236
+
}
237
+
238
+
# Materialize without event timestamps
239
+
materialize_data_no_timestamps = {
240
+
"feature_views": ["driver_hourly_stats"],
241
+
"disable_event_timestamp": True
242
+
}
243
+
244
+
requests.post(
245
+
"http://localhost:6566/materialize",
246
+
data=json.dumps(materialize_data))
247
+
```
248
+
203
249
## Starting the feature server in TLS(SSL) mode
204
250
205
251
Enabling TLS mode ensures that data between the Feast client and server is transmitted securely. For an ideal production environment, it is recommended to start the feature server in TLS mode.
**Option 3: Simple materialization without timestamps**
124
+
```commandline
125
+
feast materialize --disable-event-timestamp
126
+
```
127
+
128
+
The `--disable-event-timestamp` flag allows you to materialize all available feature data using the current datetime as the event timestamp, without needing to specify start and end timestamps. This is useful when your source data lacks proper event timestamp columns.
129
+
115
130
```commandline
116
131
Materializing feature view driver_hourly_stats from 2021-04-14 to 2021-04-15 done!
Run a (non-incremental) materialization job to ingest data into the online store. Feast
@@ -322,13 +331,35 @@ def materialize_command(
322
331
Views will be materialized.
323
332
324
333
START_TS and END_TS should be in ISO 8601 format, e.g. '2021-07-16T19:20:01'
334
+
335
+
If --disable-event-timestamp is used, timestamps are not required and all available data will be materialized using the current datetime as the event timestamp.
325
336
"""
326
337
store=create_feature_store(ctx)
327
338
339
+
ifdisable_event_timestamp:
340
+
ifstart_tsorend_ts:
341
+
raiseclick.UsageError(
342
+
"Cannot specify START_TS or END_TS when --disable-event-timestamp is used"
343
+
)
344
+
now=datetime.now()
345
+
# Query all available data and use current datetime as event timestamp
346
+
start_date=datetime(
347
+
1970, 1, 1
348
+
) # Beginning of time to capture all historical data
349
+
end_date=now
350
+
else:
351
+
ifnotstart_tsornotend_ts:
352
+
raiseclick.UsageError(
353
+
"START_TS and END_TS are required unless --disable-event-timestamp is used"
0 commit comments