SqlBuildProject
Project metadata and DAG artifact preparation.Methods
SqlBuildCliResource
DagsterConfigurableResource that shells out to the SQLBuild CLI.
cli()
Create a CLI invocation for the provided command arguments.SqlBuildCliInvocation.
SqlBuildCliInvocation
A running or completed SQLBuild CLI subprocess.Methods
Properties
stream() behavior
stream() is the primary way to emit Dagster events from a SQLBuild execution:
- Waits for the subprocess to complete while streaming output to stdout/stderr
- Reads the structured execution JSON (from
--json-outputtempfile) - Maps each completed asset to a
MaterializeResultwith metadata (status, duration, row counts) - Maps each check result to an
AssetCheckResultwith pass/fail, severity, and check metadata - If the DAG artifact is available, results are matched to the correct Dagster asset keys
- Raises
Failureif the process exited non-zero andraise_on_erroris set
sqlbuild_assets
Decorator that creates a Dagster multi-asset definition from a SQLBuild DAG artifact.
If neither
project nor dag is provided, the decorator looks for target/sqlbuild_dag.json in the current directory.
sqlbuild_scenario_checks
Decorator that creates a Dagster multi-asset-check definition for SQLBuild scenarios only. Useful when you want to run scenarios separately from the main build.sqlbuild_assets except there is no include_scenario_checks flag.
SqlBuildDagsterTranslator
Customise how SQLBuild DAG nodes map to Dagster asset metadata. Subclass and override any method.Methods
Node structure
Eachnode dict passed to translator methods contains:
Check structure
Eachcheck dict passed to check translator methods contains:

