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.

quickstart.chronusql
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 topic

Start

Contents

Contents documentation for ChronusQL.

Read topic

Start

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 topic

Start

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 topic

Start

Input and Output Model

ChronusQL reads JSON objects. The tests cover JSON Lines and JSON arrays.

Read topic

Language

Core Query Grammar

The basic single-query shape is:

Read topic

Language

Projection and Aliases

Projection selects fields from the input payload.

Read topic

Language

Filtering

`WHERE` filters events before projection or aggregation.

Read topic

Language

Timestamp Handling

`TIMESTAMP BY` selects event time from a JSON field.

Read topic

Language

Aggregation

ChronusQL supports finite batch aggregations and event-time windowed aggregations.

Read topic

Language

Windowing

ChronusQL has two tested windowing modes:

Read topic

Language

WITH Scripts and Multiple Outputs

ChronusQL scripts can define intermediate named scopes with `WITH`, then write one or more final outputs.

Read topic

Advanced

Pattern Matching With MATCH_RECOGNIZE

`MATCH_RECOGNIZE` detects ordered event patterns over a timestamped stream.

Read topic

Advanced

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 topic

Advanced

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 topic

Reference

Error Handling and Supported Constraints

The tests cover several user-facing validation behaviors:

Read topic

Reference

Grammar Reference

This grammar is intentionally product-oriented rather than a complete parser specification. It reflects the syntax covered by tests.

Read topic