Switchboard Docs
Data engineering

Build models

Refresh model tables and inspect the build result.

A build runs a model's query and stores its result. An upstream model supplies its input. A downstream model reads its output.

Before you start

You need Builder, Admin, or a custom role with model editing access. Check that the source data has synced. A build uses the data already available in Switchboard.

Build one model

  1. Open the model in Models.
  2. Make and validate the required changes.
  3. Select Save, or choose a scope from the menu beside it.
  4. Open Models > Runs and inspect the resulting build.

The default Save scope is model+.

ScopeWhat builds
modelThis model only.
+modelIts upstream dependencies, then this model.
model+This model, then its downstream dependencies.
+model+Upstream dependencies, this model, and downstream dependencies.

A dependent model waits for the models it reads. Models with completed dependencies can build in parallel when capacity is available. Each model becomes eligible as soon as its own dependencies finish; unrelated models do not need to finish first. Use the graph to inspect those dependencies before choosing a broad scope.

Build all models

Open Models > Runs and select Build All. Inspect the run's status and individual model results. A failed model includes error details. Correct the model or its input, then rerun the required scope.

A source also offers Synchronize and build downstream models under More sync options when models depend on it. This action syncs the source before building its dependent models. It requires both source and model editing access.

Rebuild from scratch

Rebuild from Scratch… drops existing model data and regenerates it. Use this action from the model's menu when you need to replace its stored table. When you change primary keys, the editor warns that a rebuild is required and offers Save and Rebuild.

Verify build status

A model can show Awaiting Build after its definition changes. Confirm that the latest relevant build succeeded before using its charts. For a failed build, inspect the error and the upstream model results.

Automatic retries

Temporary failures, such as connection errors and timeouts, can trigger an automatic retry of the affected model. The model waits between attempts. Its dependents wait for it to succeed. SQL errors and other non-retryable failures require a correction before another build.

Inspect the final result in Runs before starting another run. If retries are exhausted, correct the reported problem and rebuild the required scope.

Next, build an explore from the model.

On this page