Skip to content

Commit ca8a7ab

Browse files
authored
fix: Fixed example materialize-incremental and improved explanation (#4734)
fixed example materialize-incremental and improved explanation Signed-off-by: dandawg <[email protected]>
1 parent 32e6aa1 commit ca8a7ab

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

docs/getting-started/quickstart.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -493,19 +493,14 @@ print(training_df.head())
493493
{% endtabs %}
494494
### Step 6: Ingest batch features into your online store
495495

496-
We now serialize the latest values of features since the beginning of time to prepare for serving (note:
497-
`materialize-incremental` serializes all new features since the last `materialize` call).
496+
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)).
498497

499498
{% tabs %}
500499
{% tab title="Bash" %}
501500
```bash
502501
CURRENT_TIME=$(date -u +"%Y-%m-%dT%H:%M:%S")
503-
# For mac
504-
LAST_YEAR=$(date -u -v -1y +"%Y-%m-%dT%H:%M:%S")
505-
# For Linux
506-
# LAST_YEAR=$(date -u -d "last year" +"%Y-%m-%dT%H:%M:%S")
507502

508-
feast materialize-incremental $LAST_YEAR $CURRENT_TIME
503+
feast materialize-incremental $CURRENT_TIME
509504
```
510505
{% endtab %}
511506
{% endtabs %}

examples/quickstart/quickstart.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -758,14 +758,14 @@
758758
"source": [
759759
"### Step 5a: Using `materialize_incremental`\n",
760760
"\n",
761-
"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).\n",
762-
"\n",
763-
"An alternative to using the CLI command is to use Python:\n",
761+
"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)). \n",
764762
"\n",
765763
"```bash\n",
766764
"CURRENT_TIME=$(date -u +\"%Y-%m-%dT%H:%M:%S\")\n",
767765
"feast materialize-incremental $CURRENT_TIME\n",
768-
"```"
766+
"```\n",
767+
"\n",
768+
"An alternative to using the CLI command is to use Python:"
769769
]
770770
},
771771
{
@@ -1100,4 +1100,4 @@
11001100
},
11011101
"nbformat": 4,
11021102
"nbformat_minor": 0
1103-
}
1103+
}

0 commit comments

Comments
 (0)