Ubik

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/ubik

For 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

On this page