comeonoliver/skillshub/creating-bauplan-pipelines
Claude Code and agent skill by comeonoliver/skillshub
- community
- ext:[{"type":"config","description":"Configuration overrides"}]
Checking that the SKILL.md file is still in the repository.
Creates bauplan data pipeline projects with SQL and Python models. Use when starting a new pipeline, defining DAG transformations, writing models, or setting up bauplan project structure from scratch.
Install
npx vskill@latest install comeonoliver/skillshub/creating-bauplan-pipelinesSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as comeonoliver/skillshub/creating-bauplan-pipelines.
Creating a New Bauplan Data Pipeline
This skill guides you through creating a new bauplan data pipeline project from scratch, including the project configuration and SQL/Python transformation models.
CRITICAL: Branch Safety
NEVER run pipelines on `main` branch. Always use a development branch.
Branch naming convention: <username>.<branch_name> (e.g., john.feature-pipeline). Get your username with bauplan info. See Workflow Checklist for exact commands.
Prerequisites
Before creating the pipeline, verify that:
- You have a development branch (not
main) - Source tables exist in the bauplan lakehouse (the default namespace is
bauplan) - You understand the schema of the source tables
Pipeline as a DAG
A bauplan pipeline is a DAG of functions (models). Key rules:
- Models: SQL or Python functions that transform data
- Source Tables: Existing lakehouse tables - entry points to your DAG
- Inputs: Each model can take multiple tables via
bauplan.Model()references - Outputs: Each model produces exactly one table:
- SQL: output name = filename (
trips.sql→trips) - Python: output name = function name (
def clean_trips()→clean_trips)
- Topology: Implicitly defined by input references - bauplan determines execution order
Expectations: Data quality functions that take tables as input and return a boolean.
Example DAG
In this example:
taxi_fhvhvandtaxi_zonesare source tables (already in lakehouse)trips.sqlreads fromtaxi_fhvhv(SQL model, first node)clean_tripstakestripsandtaxi_zonesas inputs (Python model, multiple inputs)daily_summarytakesclean_tripsas input (Python model, single input)
Required User Input
Before writing a pipeline, you MUST gather the following information from the user:
- Pipeline purpose (required): What transformations should the DAG perform? What is the business logic or goal?
- Source tables (required): Which tables from the lakehouse should be used as inputs? Verify they exist with
bauplan table get - Output tables (required): Which tables should be materialized at the end of the pipeline? These are the final outputs visible to downstream consumers
- Materialization strategy (optional): Should output tables use
REPLACE(default) orAPPEND? - Strict mode (optional): Should the pipeline run in strict mode? If yes, all CLI commands will use
--strictflag, which fails on issues like output column mismatches during dry-run, allowing immediate error detection and correction.
If the user hasn't provided this information, ask before proceeding with implementation.
Strict Mode (--strict flag)
When strict mode is enabled, append --strict to all bauplan run commands:
Benefits of strict mode:
- Fails immediately on output column mismatches
- Fails immediately if an expectation fails
- Allows you to rectify declaration errors before pipeline completion
- Recommended when iterating on pipeline development
Project Structure
A bauplan project is a folder containing:
bauplan_project.yml
Every project is a separate folder which requires this configuration file:
When to Use SQL vs Python Models
IMPORTANT: SQL models should be LIMITED to first nodes in the pipeline graph only.
- SQL models: Use ONLY for nodes that read directly from source tables in the lakehouse (tables outside your pipeline graph)
- Python models: Preferred for ALL other transformations in the pipeline
This ensures consistency and allows for better control over transformations, output schema validation, and documentation.
SQL Models (First Nodes Only)
SQL models are .sql files where:
- The filename becomes the output table name
- The FROM clause defines input tables
- Optional: Add materialization strategy as a comment
Use SQL models only when reading from existing lakehouse tables:
Output table: trips (from filename) Input table: taxi_fhvhv (from FROM clause, exists in lakehouse)
Python Models (Preferred)
Python models use decorators to define transformations. They should be used for all pipeline nodes except first nodes reading from the lakehouse.
Key Decorators
@bauplan.model()- Registers function as a model@bauplan.model(columns=[...])- Specify expected output columns for validation (Optional but recommended)@bauplan.model(materialization_strategy='REPLACE')- Persist output to lakehouse@bauplan.python('3.11', pip={'pandas': '1.5.3'})- Specify Python version and packages
Best Practice: Output Columns Validation
IMPORTANT: whenever possible, specify thecolumnsparameter in@bauplan.model()to define the expected output schema. This enables automatic validation of your model's output.
First, check the schema of your source tables to understand input columns. Then specify the output columns based on your transformation:
Best Practice: Docstrings with Output Schema
IMPORTANT: Every Python model should have a docstring describing the transformation and showing the output table structure as an ASCII table (if the table is too wide, show only key columns, if values are too large, truncate them in the cells).
I/O Pushdown with columns and filter
IMPORTANT: whenever possible, usecolumnsandfilterparameters inbauplan.Model()to restrict the data read. This enables I/O pushdown, dramatically reducing the amount of data transferred and improving performance. Do not read columns you don't need.
Whenever possible, specify:
columns: List only the columns your model actually needsfilter: SQL-like filter expression to restrict rows at the storage level, if appropriate
Basic Python Model
Python Model with Multiple Inputs
Models can take multiple tables as input - just add more bauplan.Model() parameters:
See examples.md for complete multi-input examples with Polars.
Workflow Checklist
Copy this checklist and track your progress:
CRITICAL: Never run onmainbranch. Steps 2-4 ensure you're on a development branch.
Materialization Checklist
After writing models, verify that each model has the correct materialization_strategy based on user requirements:
| Model Type | No Materialization (intermediate) | Materialized Output | |
|---|---|---|---|
| Python | @bauplan.model() (no strategy) | @bauplan.model(materialization_strategy='REPLACE') or 'APPEND' | |
| SQL | No comment needed | Add comment: -- bauplan: materialization_strategy=REPLACE or APPEND |
Verify for each model:
- [ ] Intermediate tables (not final outputs): NO
materialization_strategyspecified - [ ] Final output tables requested by user:
materialization_strategy='REPLACE'(default) or'APPEND' - [ ] If user specified APPEND for any table: confirm
materialization_strategy='APPEND'is set
Example Python decorator for materialized output:
Example SQL comment for materialized output:
Advanced Examples
See examples.md for:
- APPEND materialization strategy
- DuckDB queries in Python models
- Data quality expectations
- Multi-stage pipelines
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/aiskillstore/marketplace/bauplanlabs/creating-bauplan-pipelines/SKILL.md
Popularity
- Repository stars
- 66
- Repository forks
- 24
- 7-day trend score
- 26
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Extension points
configConfiguration overrides
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/comeonoliver/skillshub/creating-bauplan-pipelines)