Getting started
Install Ubik, query the public Kafka stream, then create a pipeline or embed the engine.
Ubik runs SQL over event streams in one process. Use the CLI for standalone pipelines, or embed the engine through Python or C.
Try it in your browser
Open the live shell. It runs the released binary against public demo topics with generated orders and payments. No install or signup.
Install
brew tap magiclex/ubik && brew trust magiclex/ubik
brew install magiclex/ubik/ubikFor Python: pip install ubik-sql. See the Python quickstart.
Linux x86_64, Linux aarch64 and macOS arm64 (macOS 12 or later). Download checksum-verified tarballs.
Run a query
Use the live shell or your local installation:
ubik --from kafka://demo.getubik.dev/orders \
"SELECT merchant, TUMBLE(ts, INTERVAL '5' SECOND) AS w,
count(*) AS orders
FROM orders
GROUP BY merchant, TUMBLE(ts, INTERVAL '5' SECOND)"Each completed five-second window produces a count per merchant. The query
reads retained events first, then follows the live stream. Press Ctrl+C to stop.
Results display as a table in the terminal and JSON on a pipe; -f json forces JSON.
To run against your own broker with recovery across restarts, create a checkpointed pipeline. For window closure, late events and output guarantees, see exactly-once.
Reference
Exactly-once
What a checkpoint holds, what a kill -9 guarantees, and a run you can
reproduce that stops mid-window and resumes with nothing lost or
double-counted.
Kafka
Source and sink over the Kafka protocol, per-partition offsets, the transactional changelog, TLS and SASL, and the Avro and JSON wire formats.
Demo stream
A public read-only broker at demo.getubik.dev with two correlated topics: a windowed aggregate and a stream-stream interval join with no broker of your own.
Windows
TUMBLE, HOP and SESSION, the window_start output column, and the
malformed calls the planner refuses before it binds.
Continuous views
A live GROUP BY with no window: one running value per key, republished as
an upsert changelog on the --emit-every cadence.
Pipelines
Named, supervised jobs, one process each, resumed from checkpoint across a restart.
Python
import ubik, run streaming SQL in-process over libubik, results as
pyarrow, pandas or polars.