Mostly HarmlessStreams, tables & the cluster

Materialized view (streaming)

A streaming materialized view is a query result kept continuously up to date as events arrive.

Also called: continuous view, incremental view maintenance

Materialized view (streaming) - a streaming materialized view is a query result the engine keeps continuously up to date as data arrives, instead of recomputing it when you ask. The mechanism is incremental: each event folds into the running result, and only the groups that changed get republished. This is what streaming SQL is actually for. Nobody buys a stream processor to rename JSON fields; they buy it because SELECT merchant, sum(amount) GROUP BY merchant over a live topic is a dashboard, a feature store and a cache in one query.

The trap is in the word view. It sounds like a database object sitting somewhere, but the output is a flow of updates, so what you actually operate is an upsert changelog keyed by the group tuple: the table pose and the stream pose of the same result (stream-table duality, again).

Do you need it? Yes. In ubik, a --follow query whose GROUP BY has no window is a materialised view: one running value per group, republished on --emit-every (default 2 seconds), checkpointed so a kill -9 resumes with no group double-counted. One process, no view manager.

Sources

Related