Choose a view
Choose a regular view for query-time logic, a streaming view for row-by-row filtering and transformation, or a materialized view for windowed aggregation. Streaming and windowed views require a streaming catalog. Create them before sending example input, and check derived results separately from source-write completion.
BoilStream supports three types of views on __stream DuckLake catalogs:
| Syntax | Purpose | Output | When it runs |
|---|---|---|---|
CREATE VIEW |
Query-time SQL expansion | None (virtual) | On every query |
CREATE STREAMING VIEW |
Continuous row-by-row transform | Derived topic | On every row |
CREATE MATERIALIZED VIEW ... WITH (...) |
Windowed aggregation | Output topic | On window close |
Create a regular view
Section titled “Create a regular view”Connect to an authorized catalog with DDL permission and create an events table with user_id BIGINT, event_type VARCHAR and ts TIMESTAMP columns before running this example. A regular view expands its query when read; it does not create an output topic.
CREATE VIEW recent_events AS SELECT * FROM events WHERE ts > NOW() - INTERVAL '1 hour';Continuous processing
Section titled “Continuous processing”- Streaming views filter and transform future arrivals.
- Windowed materialized views aggregate tumbling or sliding time windows.
Reading results and handling failures
Section titled “Reading results and handling failures”A regular view runs when queried. Streaming views transform arriving rows into derived topics; materialized views write results when their windows close. A successful source write does not mean those derived results are already available.
Do not assume materialized-view output triggers every live subscription or derived view. Check the intended workflow before building a chain of dependent outputs. After a failure, reconcile window results before replaying input; exactly-once output is not guaranteed.
Choose the query interface using the compatibility matrix. PGWire and managed DuckDB do not currently promise identical visibility of unpublished recent rows.
window_size must not exceed 80% of hot-tier retention. Keep enough retained data for the
windows you intend to calculate.