This repository contains runnable, minimal examples that show how to integrate Bauplan with popular orchestrators and interactive apps. Each example is intentionally small so you can copy it into your environment and adapt to your project.
The repo includes:
- Bauplan pipelines used by the examples (
bauplan_pipelines/). - Orchestrator integrations: Airflow, Prefect, Dagster, Temporal, DBOS (
orchestrators/). - Interactive apps: Streamlit, Marimo, Jupyter (
notebooks_and_apps/).
All examples follow the same pattern: the orchestrator or app handles the UI, scheduling, and logging, while Bauplan runs the data work (pipelines, queries, branching) against your lakehouse.
Docs: https://docs.bauplanlabs.com/ (see “Concepts → Projects,” “Guides → Parameters,” and “Guides → Secrets”).
- Python 3.10 or newer.
- A Bauplan API key or local profile.
- The client resolves credentials in this order:
BAUPLAN_API_KEY→BAUPLAN_PROFILE→~/.bauplan/config.yml.
- The client resolves credentials in this order:
- A Bauplan sandbox environment with example tables like
taxi_fhvhvandtaxi_zones, or substitute your own tables. - Per-example dependencies are listed in each subfolder’s
requirements.txt.
Authentication example:
import bauplan
client = bauplan.Client(api_key="YOUR_KEY") # overrides environment/profileSet via environment if preferred:
bauplan config set api_key <your_key>Create a clean virtual environment and install dependencies for the example you want to run.
python -m venv .venv && source .venv/bin/activate
pip install -r orchestrators/prefect/requirements.txt # or airflow/dagster/temporal/dbos, or notebooks_and_apps/streamlitPick a pipeline to run:
bauplan_pipelines/simple_pipeline– no parameters.bauplan_pipelines/pipeline_with_parameters– uses$start_timeinbauplan_project.yml.
Most examples construct a user-scoped branch name like {username}.{suffix}. This keeps app and test runs isolated from main.
Run a Bauplan pipeline:
pip install -r orchestrators/prefect/requirements.txt
python orchestrators/prefect/bauplan_prefect_flow.pyRun with parameters:
python orchestrators/prefect/bauplan_prefect_with_param.py
# Edit pipeline_path, branch_suffix, and parameters in __main__ if needed- Requires Airflow 2.10+ or 3.0+ and a configured Airflow environment.
- Install requirements, then copy the DAG files into your
$AIRFLOW_HOME/dagsfolder or load them as part of your plugins/module.
pip install -r orchestrators/airflow/requirements.txt
# Copy DAGs
cp orchestrators/airflow/bauplan_airflow3_flow.py $AIRFLOW_HOME/dags/
cp orchestrators/airflow/bauplan_airflow3_with_param.py $AIRFLOW_HOME/dags/
airflow webserver
airflow schedulerIn each file, update project_dir to point at one of the folders under bauplan_pipelines/ before deploying the DAGs.
You can run the example directly as a Python script (the file includes an if __name__ == "__main__" block with execute_in_process), or load it with dagster dev.
Run the script:
pip install -r orchestrators/dagster/requirements.txt
python orchestrators/dagster/bauplan_dagster_flow.py
python orchestrators/dagster/bauplan_dagster_with_param.pyOr use the UI:
export PYTHONPATH="$PWD/orchestrators/dagster:$PYTHONPATH"
dagster dev -m bauplan_dagster_flowUpdate project_dir, bauplan_branch_suffix, and parameters in the file or in run_config as needed.
- Requires a Temporal server at
localhost:7233. For a quick start, use Temporal’s Docker Compose. - Install requirements, then start the worker and workflow runner.
pip install -r orchestrators/temporal/requirements.txt
# Basic example (no parameters)
python orchestrators/temporal/workflow_and_worker.py
# With parameters
python orchestrators/temporal/workflow_and_worker_with_param.pyActivities call bauplan.Client().run(...) and raise on non-success job status. Update project_dir, bauplan_branch_suffix, and parameters before running.
The examples default to SQLite via DBOS Python. To use Postgres, set DBOS_SYSTEM_DATABASE_URL.
pip install -r orchestrators/dbos/requirements.txt
# Basic example
python orchestrators/dbos/dbos_bauplan_flow.py
# With parameters
python orchestrators/dbos/dbos_bauplan_with_param.pyA small UI for ad hoc exploration against an isolated branch.
pip install -r notebooks_and_apps/streamlit/requirements.txt
streamlit run notebooks_and_apps/streamlit/streamlit_app.pyThe app reads from taxi_fhvhv and plots simple aggregations. Adjust the query inside the file to target your own tables if needed.
An interactive notebook-style app with reactive cells and cached queries.
pip install -r notebooks_and_apps/marimo/requirements.txt
marimo run notebooks_and_apps/marimo/marimo_app.pyOpen the notebook(s) under notebooks_and_apps/jupyter/ in JupyterLab or VS Code. The examples demonstrate the same branch pattern used by the apps above.
bauplan_pipelines/pipeline_with_parameters/bauplan_project.yml defines a project-level parameter:
parameters:
start_time:
type: str
default: "2022-12-15T00:00:00-05:00"You can override it at runtime from any integration:
state = client.run(
project_dir="path/to/pipeline_with_parameters",
ref=f"{username}.your_branch",
parameters={"start_time": "2023-01-01T00:00:00-05:00"},
)See docs: https://docs.bauplanlabs.com/en/latest/guides/parameters/
Secrets can be passed securely via Bauplan and should not be hardcoded. See: https://docs.bauplanlabs.com/en/latest/guides/secrets/
- Never run apps against
main. Use{username}.suffixbranches to keep experiments isolated. - Replace sample tables (
taxi_fhvhv,taxi_zones) with your own if they are not present in your catalog.
This project is provided with no guarantees under the attached MIT License.