Incremental Views
CREATE INCREMENTAL VIEW DDL for incrementally maintained query results.
Overview
Incremental views maintain a query result that updates incrementally when source data changes, rather than re-running the full query on each tick. Implemented via IncrementalFlow backed by DeltaBatch (weighted Arrow rows).
Experimental: End-to-end connector certification and distributed executor-side IVM are in progress.
DDL Statements
| Statement | Description |
|---|---|
CREATE INCREMENTAL VIEW <name> AS <query> | Register an incremental view backed by a SQL query. |
DECLARE INCREMENTAL VIEW <name> AS <query> WITH ORDINAL | Register with an explicit ordinal (row-position) column for ordered IVM. |
REFRESH INCREMENTAL VIEW <name> | Re-evaluate and update the view from current source data. |
DROP INCREMENTAL VIEW <name> | Remove the view registration. |
Example
CREATE INCREMENTAL VIEW order_totals AS
SELECT customer_id, SUM(amount) AS total
FROM orders
GROUP BY customer_id;
REFRESH INCREMENTAL VIEW order_totals;
SELECT * FROM order_totals;
Python / Rust API
See the Python Session page for IncrementalFlow bindings. The SQL DDL and the IncrementalFlow API share the same underlying registry.