Skip to content

Commit

Permalink
fix: Fixed example materialize-incremental and improved explanation (#…
Browse files Browse the repository at this point in the history
…4734)

fixed example materialize-incremental and improved explanation

Signed-off-by: dandawg <12484302+dandawg@users.noreply.github.com>
  • Loading branch information
dandawg authored Nov 5, 2024
1 parent 32e6aa1 commit ca8a7ab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
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
}
}

0 comments on commit ca8a7ab

Please sign in to comment.