Structure a Bauplan project
A lakehouse is fed and transformed by many pipelines. In Bauplan, each pipeline is a project: a directory with a bauplan_project.yaml file, run as a unit. How you split models across projects affects how readable the codebase is, and decides which models run, fail, and are published together.
Split projects along the dependencies between models. Models that read each other's output belong in one project, and chains of models that share no tables belong in separate ones. Then group the projects by area, one directory each.
- bauplan_project.yaml
- …
- bauplan_project.yaml
- …
- bauplan_project.yaml
- …
Keep models that read each other in one project
When a model reads the output of another, keep both in the same project.
Models in the same project form one unit, both in the code and at execution time. When Bauplan runs a project, it materializes all the output tables on the target branch in one atomic transaction, so either every table is written or, if anything fails, none is. Within the run, Bauplan executes independent models in parallel, and models can pass intermediate tables to each other without materializing them. Across projects this is not possible. The upstream project has to write the table and the downstream project has to read it back, which adds a write and a read for every table passed.
With one project, clean_orders is never written, and daily_revenue is published only if both models succeed. With two projects, clean_orders is written to the branch and read back, and a failure of the second project leaves it on the branch without daily_revenue.
Split independent chains into separate projects
If two chains of models share no tables, put each one in its own project, and do the same for a "singleton" model. Don't put everything into one project with many independent nodes.
In the example, no arrow connects the orders chain and the users chain so they go in separate projects.
With separate projects, a failure in users does not stop sales from being published, and your orchestrator retries only users.
Parallelism across projects is not automatic. To run several projects at the same time, launch them yourself, for example from a thread pool with one project per thread; see how to run jobs concurrently.
Group projects by layer or by area
Give each project its own directory, and group the directories by area, as in the tree above, or by layer. A common pattern splits a large layer into several projects, one per area, so that each project stays small enough to read and run on its own.