Learn dbt on real data, then give it a natural-language interface with Claude.
This is a hands-on tutorial. You build a tested dbt project on real National Park Service biodiversity data (5,824 species, 23,296 observations across 4 national parks), then connect it to Claude so you can ask questions in plain English and get real answers back.
A clean data pipeline:
seeds (raw CSVs) -> staging (cleaned) -> marts (ready to analyze)
Then an MCP server that lets Claude query it safely:
You: Which park has the most endangered species sightings?
Claude: (lists the tables, reads the schema, writes the SQL, runs it) Yellowstone, with the highest at-risk observation counts of the four parks...
Claude can read everything and change nothing — queries are locked to read-only SELECTs.
The interactive lab runs in your browser — no local setup required:
Requires Python 3.11+.
pip install -r llm_query/requirements.txt
cd dbt_project
dbt build --profiles-dir .Then open the repo in Claude Code (the MCP server connects automatically via .claude/settings.json) or wire it into Claude Desktop using llm_query/claude_desktop_config.example.json.
Work through these in order:
| Piece | What it does |
|---|---|
dbt_project/seeds/ |
Raw NPS biodiversity CSVs |
dbt_project/models/staging/ |
One cleaned view per source |
dbt_project/models/marts/ |
Three analysis tables with tests + column docs |
llm_query/mcp_server.py |
MCP server: list_tables, describe_table, run_query (SELECT-only) |
.claude/settings.json |
Auto-connects the MCP server in Claude Code |
The database is DuckDB — it runs in-process, so there's no server to start and no credentials to manage.
National Park Service biodiversity dataset, covering Bryce, Great Smoky Mountains, Yellowstone, and Yosemite.