Skip to main content
SQLBuild includes a Rivers integration that maps your project’s models, sources, seeds, loaders, tasks, assets, and functions into Rivers assets with dependency edges preserved. SQLBuild handles the SQL transformation layer. Rivers handles scheduling, execution, and the asset-centric UI.

Install

This installs rivers alongside SQLBuild.

Try it

This creates the waffle shop project with a rivers_pipeline/definitions.py that includes asset definitions and a configured job. Open the Rivers UI to inspect assets and trigger materializations.

How it works

  1. sqb compile --dag generates a static sqlbuild_dag.json artifact with your project’s full graph (nodes, edges)
  2. @sqlbuild_assets() reads the artifact and creates one Rivers AssetDef per source, loader, seed, model, function, task, and asset, with dependency edges preserved
  3. The decorated function runs sqb build as a subprocess and yields Materialization events for each output

Quickstart

SqlBuildProject

SqlBuildProject manages paths and DAG artifact generation:

Methods

Use prepare_if_dev() so the DAG artifact is auto-generated during local development but not during production deployments where it should already exist.

sqlbuild_assets

The @sqlbuild_assets() decorator creates a Rivers multi-asset definition from a SQLBuild DAG artifact:
Pass either project or dag, not both.

SqlBuildRiversTranslator

Override the default mapping from SQLBuild DAG nodes to Rivers asset metadata:

Translator methods

Running locally

Run the pipeline directly without the Rivers UI:
Or start the Rivers development server: