Choose what to materialize
Since every materialized model adds a write and a commit to each run, two pitfalls often account for most of a run's cost in large DAGs: materializing tables that no consumer reads, and using the REPLACE materialization strategy (which rewrites the whole table each time) on tables where only a small part changes. For how each strategy works, see how to materialize pipeline outputs.
Materialize only the models that something outside the pipeline reads, leave every other model as NONE, and write large outputs incrementally rather than rebuilding them.
Start from the consumers
Walk the DAG backwards from its consumers, and materialize a model only when:
- Something outside the project reads it, such as a dashboard, or an agent through an MCP server;
- It is a final output of the pipeline;
- A later Bauplan project needs to read it;
- You want to keep it as a checkpoint to inspect.
If a later project reads the whole table, merge the two projects instead, so the table is handed over in memory; see how to structure a Bauplan project.
Do not materialize every model of the pipeline!
Leave everything else as NONE
In all other cases, leave the model with materialization_strategy="NONE", the default. A model that is not materialized costs no write to object storage and no commit, because its output is handed to the models that read it within the same run. Splitting a pipeline into many such models costs nothing in I/O; see how to structure a pipeline.