Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fixed example materialize-incremental and improved explanation #4734

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions docs/getting-started/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,19 +493,14 @@ print(training_df.head())
{% endtabs %}
### Step 6: Ingest batch features into your online store

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).
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)).

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

feast materialize-incremental $LAST_YEAR $CURRENT_TIME
feast materialize-incremental $CURRENT_TIME
```
{% endtab %}
{% endtabs %}
Expand Down
10 changes: 5 additions & 5 deletions examples/quickstart/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -758,14 +758,14 @@
"source": [
"### Step 5a: Using `materialize_incremental`\n",
"\n",
"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",
"\n",
"An alternative to using the CLI command is to use Python:\n",
"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",
"\n",
"```bash\n",
"CURRENT_TIME=$(date -u +\"%Y-%m-%dT%H:%M:%S\")\n",
"feast materialize-incremental $CURRENT_TIME\n",
"```"
"```\n",
"\n",
"An alternative to using the CLI command is to use Python:"
]
},
{
Expand Down Expand Up @@ -1100,4 +1100,4 @@
},
"nbformat": 4,
"nbformat_minor": 0
}
}
Loading