Examples

Worked examples for both halves of 0sql: the query specs you POST and the YAML projects they plan against. Start with the chat dashboard if you want to see the whole thing work before reading a spec. The cookbook and the tutorials below are built on the TPC-DS model; the dashboard has a model of its own.

See it work: the chat dashboard

A dashboard you talk to. You type “which call centers have the longest average handle time?”, an agent writes a 0sql query spec, 0sql plans one SQL statement with the caller’s row-level security compiled in, and the app runs it on its own warehouse and draws the chart. Say “pin that” and the chart becomes a tile. The agent never writes SQL and never sees a connection string. The build, step by step, in 34 minutes: youtu.be/6stVUI4MUio.

Four ways in, from quickest to deepest:

Request cookbook

Eight pages, one feature each. Each page states a problem, shows the request (JSON spec and the zsql shorthand where it can express it), the SQL that comes back, why the SQL has that shape, and the spec changes that give you the variations.

Tutorials

  • Chat dashboard tutorial: the dashboard above, built in three steps: deploy the model, give the agent the 0sql tools, wire up the dashboard
  • TPC-DS tutorial: a complete walkthrough of the TPC-DS project, from zsql init to the first query

Patterns

Recipes

Suggested order

  1. Watch the chat dashboard get built, or ask its agent a question, to see what the API is for.
  2. Read the Request cookbook to see what one request can ask for.
  3. Follow the TPC-DS tutorial to deploy the model those requests run against.
  4. Use the patterns and recipes when you model your own warehouse.