Skip to content
Open Saka

First steps

SakaQL is the language you use to ask questions about data and to change it in Saka. This tutorial teaches it one idea at a time, and each page builds on the ones before it.

  1. Open app.saka.io and choose New → New Database.
  2. Press Ctrl+` to open the REPL, the console below the editor. The key is the same on macOS.
  3. Enter each example in the REPL and press Enter. Alt+Enter starts a new line.

Each example is one entry. To enter a longer one, copy it with the button in its corner, paste it into the REPL, and press Enter. Keep using the same database for the whole tutorial: later pages use names from earlier ones.

Try your first entry:

{1, 2, 2}

The REPL answers {1, 2'2}.

The braces make a Bag: a collection of Values that can repeat. 2'2 means two copies of 2. A Bag has no order.

Every expression gives a Bag, even one that holds a single number. In these pages, a comment after an example shows its result:

1 + 1 // {2}

The REPL leaves out the braces when a Bag holds one Value, so here it answers 2.

  1. Values, Bags, Records, and Sets: describe data.
  2. Flows, pipelines, and grouping: compute with data.
  3. Functions: reuse a computation with different inputs.
  4. Stored data and changing data: keep data in the database and change it.
  5. Modules: organize your code.