skip to content

With Feast, where does `feast materialize-incremental` take its start time from, and why can it skip warehouse rows that landed late?

level: middleimportance: should knowfreq 9%

answer

  1. only an end timestamp is given
  2. intervals recorded in the registry
  3. first run falls back to ttl
  4. window filters on event timestamp
  5. lag the end, or backfill explicitly

basics

~20 s

feast materialize-incremental END_TS starts each feature view at the latest end recorded in the registry, or at now minus ttl on a first run. Rows stamped before that start are never loaded, however late they land.

solid answer

~40 s

`feast materialize START_TS END_TS` loads an explicit window into the online store; `feast materialize-incremental END_TS` takes only an end. For each feature view Feast reads the materialization intervals stored in the registry and starts at the latest recorded end; with none recorded it starts at now minus the view's `ttl`, or one year back when `ttl` is 0. Both commands record their interval, and both select source rows by event timestamp within the window, keeping the latest per key. So a nightly row stamped 00:00 that lands at 03:00, after a 02:00 run ending at now, sits before the next run's start and is never materialized. Lag the end timestamp behind the source's load delay, or re-load the gap with an explicit `feast materialize` window.

code

bash · 7 lines
bash
# Scheduled job: close the window two hours behind now,
# so rows that land up to two hours late are still picked up
END_TS=$(date -u -d '2 hours ago' +%Y-%m-%dT%H:%M:%S)
feast materialize-incremental "$END_TS" --views player_spend

# Repair: reload a gap that an earlier window skipped
feast materialize 2026-09-14T00:00:00 2026-09-15T04:00:00 --views player_spend

go deeper

for a junior

Recall the two commands, that the incremental one takes only an end timestamp, and that feast apply loads no values.

for a middle

Explain how the start is chosen per view from registry intervals, the ttl fallback on a first run, and the event-timestamp window.

for a senior

Diagnose online values a day stale from late-landing rows, and fix the run with a lagged end or an explicit repair window.

for a principal

Decide how the platform records each source's load delay so every scheduled materialization closes its window only after data exists.

## Two commands that load the online store Feast's **online store** (Redis in this scenario, SQLite by default with the `local` provider) holds the latest value per entity key and feature view. For views backed by a batch source, values get there only through **materialization**, a job that reads the offline source and writes the newest row per key into the online store. The CLI has two forms: | Command | Window | Typical use | |---|---|---| | `feast materialize START_TS END_TS` | exactly the timestamps you give | first load, backfill, repair | | `feast materialize-incremental END_TS` | from the last recorded end to `END_TS` | the scheduled job | Both accept `--views` (`-v`) to limit the run to named feature views, and both take ISO 8601 timestamps. `feast materialize --disable-event-timestamp` is a third variant for sources without an event-timestamp column: it loads all available data and stamps it with the current time. ## Where the incremental start comes from `materialize_incremental` in Feast's SDK decides the start **per feature view**: 1. If the registry holds **materialization intervals** for the view, the start is the latest recorded interval end (`most_recent_end_time`). 2. If none exist and the view has a positive `ttl`, the start is now minus `ttl`. 3. If none exist and `ttl` is 0, Feast prints a notice and starts **one year** (52 weeks) before now. 4. If none exist and `ttl` is `None`, it raises an error asking for a ttl or a prior `materialize` run. After a successful run, the interval is written back to the registry, so the next run continues from it. An explicit `feast materialize` records its interval too, which has a side effect: the incremental start is the **maximum** end ever recorded. A manual run with an end date in the future pushes every later incremental run's start past the present, and they load nothing new until the clock catches up. The CLI reference page says the incremental start is the previous end date "or the beginning of time"; the 0.66 source shows the ttl-based fallback above instead, and the source is what runs. ## Why late rows are skipped Materialization selects rows whose **event timestamp** falls inside the window, then keeps the latest per key. It does not look at when a row arrived in the warehouse. Consider a nightly `spend_7d` job whose rows are stamped 00:00 but usually finish loading at 03:00: - 02:00, run 1: `materialize-incremental` with an end of 02:00. The 00:00 rows have not landed, so none are loaded. The registry records the end 02:00. - 03:00: the 00:00 rows land in the warehouse. - next night, 02:00, run 2: the window starts at the previous 02:00. The 00:00 rows are older than the start and are never selected. The online store keeps the previous night's values for a day longer than intended, with no error anywhere. Whether a feature that stale is acceptable is a freshness question owned by the material on freshness and backfill; the mechanism here is how Feast chooses the window. ## Ways to fix it - **Lag the end timestamp**: pass `END_TS` as now minus the worst load delay, so a window closes only after its rows exist. - **Stamp rows when they become available**, if the feature's semantics allow, so late loads fall inside the next window. - **Re-load the gap explicitly** with `feast materialize START_TS END_TS` over the affected hours; the Redis store's default write path checks stored timestamps and does not overwrite a newer value with an older one. - **Never run a manual window that ends in the future**, since it moves the incremental start forward. Scheduling the job itself, from a cron entry to an orchestrator task, belongs to the data orchestration material; Feast only needs to be called with the right end timestamp. ## What `feast apply` does and does not do here `feast apply` registers definitions and creates infrastructure, such as online tables, but it loads no feature values. A newly applied view stays empty online until a materialize or a push writes it, and its first incremental run falls back to `ttl` because the registry holds no interval yet. ## Checks after a run - Print the window Feast reports per view (`<view> from <start> to <end>`) and confirm the start is what you expect. - Compare the latest event timestamp in the source with the end recorded in the registry. - Read a known key with `get_online_features` and check the event timestamp it carries.

  • What does the first `materialize-incremental` run load for a view whose `ttl` is 0?
    With no interval in the registry and a `ttl` of 0, Feast prints a notice and starts one year before now, then loads the latest row per key inside that year. Keys whose last row is older than a year get nothing online.
  • Someone ran `feast materialize` once with an end date next month. What happens to the nightly incremental job?
    The registry now records an interval ending next month, and the incremental start is the latest recorded end. Each nightly run's window therefore starts in the future, so it finds no new rows until that date passes. Meanwhile, keep the online store current with explicit `feast materialize` windows, and avoid future end dates in manual runs.

  • materialize-incremental compares warehouse load time to find new rows
  • feast apply loads the latest feature values into the online store
  • the first incremental run always starts at the beginning of time
  • a late-arriving row is picked up automatically by the next incremental run
  • materialize-incremental requires a start timestamp argument