Expand description
CREATE INCREMENTAL VIEW and DECLARE RECURSIVE VIEW SQL extensions.
Supported DDL:
-- Non-recursive incremental view (IVM)
CREATE INCREMENTAL VIEW revenue AS
SELECT customer_id, SUM(amount) AS total FROM orders GROUP BY customer_id
LATENESS event_ts INTERVAL '5' MINUTE;
-- Materialized variant (keeps a full snapshot in memory)
CREATE MATERIALIZED INCREMENTAL VIEW revenue AS ...;
-- Recursive view (fixed-point iteration, auto-DISTINCT)
DECLARE RECURSIVE VIEW reachable AS
SELECT dst FROM edges WHERE src = 0
UNION ALL
SELECT e.dst FROM edges e JOIN reachable r ON e.src = r.dst;
-- Force a re-step (no-op for streaming; useful in batch/test mode)
REFRESH INCREMENTAL VIEW revenue;
-- Remove view and its cached Trace state
DROP INCREMENTAL VIEW revenue;Structs§
- Incremental
View Entry - Metadata stored for one registered incremental view.
- Incremental
View Registry - Registry of active incremental views (SQL metadata layer).
- Lateness
Annotation - One LATENESS annotation:
LATENESS <column> INTERVAL '<n>' <unit>.
Enums§
- Incremental
View Statement - Parsed incremental-view DDL statement.
Functions§
- execute_
incremental_ view_ ddl - Apply a parsed incremental-view DDL statement to the registry.
- parse_
incremental_ view_ statement - Parse incremental-view DDL statements from a SQL string.