ChronuSQL Documentation
Build temporal stream processors with ChronuSQL.
Learn the CLI, JSON stream model, event-time SQL, windows, pattern recognition, window statistics, temporal ML, and Chronusphaera observability concepts.
SELECT SensorId,
Window.EndTime AS WindowEnd,
COUNT(*) AS EventCount
INTO output
FROM input TIMESTAMP BY ts
GROUP BY SensorId,
TumblingWindow(Duration(second, 8))Topics
Documentation map
Start
Overview
ChronusQL is a SQL-like event processing language for JSON event streams.
Read topicStart
Contents
Contents documentation for ChronusQL.
Read topicStart
Getting Started
The smallest useful ChronusQL query reads JSON events from an input stream, projects fields, and writes JSON rows to an output stream.
Read topicStart
ChronusQL CLI
The CLI accepts query text or a query file, named input and output bindings, and optional streaming read modes. The test suite validates these argument forms.
Read topicStart
Input and Output Model
ChronusQL reads JSON objects. The tests cover JSON Lines and JSON arrays.
Read topicLanguage
Core Query Grammar
The basic single-query shape is:
Read topicLanguage
Projection and Aliases
Projection selects fields from the input payload.
Read topicLanguage
Filtering
`WHERE` filters events before projection or aggregation.
Read topicLanguage
Timestamp Handling
`TIMESTAMP BY` selects event time from a JSON field.
Read topicLanguage
Aggregation
ChronusQL supports finite batch aggregations and event-time windowed aggregations.
Read topicLanguage
Windowing
ChronusQL has two tested windowing modes:
Read topicLanguage
WITH Scripts and Multiple Outputs
ChronusQL scripts can define intermediate named scopes with `WITH`, then write one or more final outputs.
Read topicAdvanced
Pattern Matching With MATCH_RECOGNIZE
`MATCH_RECOGNIZE` detects ordered event patterns over a timestamped stream.
Read topicAdvanced
Window Statistics With WINDOW BY ... COMPUTE
`WINDOW BY ... COMPUTE` attaches window-level statistics back to individual events. Unlike `GROUP BY TumblingWindow`, it preserves per-event multiplicity and original event timestamps.
Read topicAdvanced
Temporal ML Compute
ChronusQL supports tested online temporal ML queries with multi-stream alignment, feature extraction, label definitions, online classifier training, and prediction compute fields.
Read topicReference
Error Handling and Supported Constraints
The tests cover several user-facing validation behaviors:
Read topicReference
Grammar Reference
This grammar is intentionally product-oriented rather than a complete parser specification. It reflects the syntax covered by tests.
Read topic