Skip to content

GUIDED TUTORIAL

The IncQL Book

Follow one small order dataset from typed intent to an observed, deliberately governed result. The book is organised into focused Parts, so later topics can deepen or branch from the core path without turning it into one endless sequence.

One project · expandable learning paths

Choose the part of the system you want to understand

Open one Part at a time. Every chapter names its owner, outcome, and primary artifact.

Part I Model the work Typed source → deferred plan 2 chapters
Part II Explain and execute it Inspection → observed attempt → coverage 3 chapters
Part III Decide what happens next Quality evidence → caller decision 2 chapters
Part IV Query blocks SQL-familiar clauses → typed results 2 chapters

What you will build

The project reads an included CSV through a Session, carries an intended Order row model, and builds a deferred LazyFrame. You will inspect that plan through Prism before asking the current DataFusion adapter to execute it. The later core chapters separate adapter coverage from data-quality observations, then make the write decision explicitly in application code.

Part IV is a direct-entry route for readers who prefer SQL-familiar clauses. It reuses the same project and typed source, but authors relational work with checked query { ... } blocks instead of method chains. You can begin there without completing Parts I–III first.

The core path ends with a deliberately modest result: a bounded three-row order review written to CSV. The query path collects a filtered row set and a grouped summary instead. Across both routes, the important part is that you can explain what IncQL knew before execution, what the backend reported afterwards, and which decisions still belonged to your code.

Before you begin

You need:

  • an Incan toolchain compatible with this checkout
  • a working Rust and CMake build toolchain for the local IncQL dependency; its protobuf sources are vendored, so a system protoc is not required
  • a local IncQL checkout; the tutorial project uses a path dependency and does not claim a registry release

From the IncQL repository root, prepare the included project once:

cd examples/tutorial_book
incan lock

Each chapter gives one incan run command from that directory. Chapters 1–7 are cumulative checkpoints for the core system path. Chapters 8–9 are independent query-block checkpoints that share the same fixture, so you can enter Part IV directly.

How this book fits the site

This edition follows one bounded CSV-to-write path and one direct-entry query-language path. Later Parts can deepen the core language or introduce a separate execution path with its own prerequisites. Use Guides for independent tasks, Reference for exact signatures and record fields, and Architecture for the complete boundary and ownership story.