Run SQL on a live stream
A real Ubik shell connected to our public Kafka topics. No install or signup. Press ↑ to select an example, then Enter to run it. Ctrl+C stops a query. Sessions last fifteen minutes.
A real container, fifteen minutes, no signup.
Results display as a table in the terminal and JSON when piped. Use -f json to force JSON. The demo topics contain generated orders and payments.
A windowed aggregate
Five-second tumbling windows over the order stream. A fresh session first chews through the retained hour of backlog - a few seconds of work - then sits on the live edge and emits a row per merchant per window.
ubik --from kafka://demo.getubik.dev/orders \ "SELECT merchant, TUMBLE(ts, INTERVAL '5' SECOND) AS w, count(*) AS orders, round(sum(amount), 2) AS total FROM orders GROUP BY merchant, TUMBLE(ts, INTERVAL '5' SECOND)"A stream-stream join
Each payment lands one to eight seconds behind its order, so the interval join matches most of them and skips the rest; unmatched orders are omitted from the result.
ubik --from kafka://demo.getubik.dev/orders \ --stream payments=kafka://demo.getubik.dev/payments \ "SELECT o.order_id, o.merchant, p.status FROM orders o JOIN payments p ON o.order_id = p.order_id AND p.ts BETWEEN o.ts AND o.ts + INTERVAL '10' SECOND"The pool is capped; past the cap you get a live queue position instead of a refusal. A session sees the demo broker and nothing else - no internet, no neighbours. Same stream, from your own machine: docs/kafka/demo-stream.