Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dbt + LLM Analytics

Learn dbt on real data, then give it a natural-language interface with Claude.

Landing page  |  Try the Lab

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.

What you'll build

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.

Try the lab

The interactive lab runs in your browser — no local setup required:

Start the Lab on Killercoda

Run it locally

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.

The tutorial

Work through these in order:

  1. What is dbt?
  2. Setup
  3. Staging models
  4. Mart models
  5. Testing and documentation
  6. LLM analytics

How it fits together

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.

Data source

National Park Service biodiversity dataset, covering Bryce, Great Smoky Mountains, Yellowstone, and Yosemite.

About

Learn dbt with real NPS biodiversity data, then add an MCP server to query it with Claude

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages