Skip to main content
This guide creates one local ClickHouse table, adopts it as a replay source, and builds a live materialized-view target with stb build.

Prerequisites

  • Python 3.12 or newer
  • Docker
  • Git
  • uv
  • curl

1. Install StreamBuild

2. Start ClickHouse

Create an input table with offset and timestamp columns. ClickHouse HTTP accepts one statement per request:

3. Create the project

quickstart/streambuild_project.toml:
Direct mode is the default, so this file intentionally omits [settings]. quickstart/sources/orders.yml:
quickstart/pipelines/orders/pipeline.yml:
quickstart/pipelines/orders/order_totals.sql:

4. Discover and compile

Compilation is offline. Review quickstart/target/manifest.json, quickstart/target/streambuild_dag.json, and the generated SQL under quickstart/target/compiled/.

5. Plan and build

Review the destructive plan and approve it with y. The build preserves orders_input, creates tbl__order_totals and mv__order_totals, then replays retained rows through the model.
Replay uses an inclusive cutoff and is intentionally at least once around that boundary. Choose model SQL and ClickHouse engines that tolerate duplicate delivery where required.
The startup command replaces any previous quickstart container, and the input setup truncates the source table, so you can repeat the guide without duplicating input rows.

Clean up

This removes the quickstart container and its anonymous ClickHouse data volume.

Next steps