Build an AI Data Analyst
Go from zero to a working AI analyst that understands your database, speaks your domain language, and answers real business questions.
What is this?
An open-source, DIY approach to building an AI data analyst. You use Bruin's CLI tools to map your database schema into context files that any AI coding assistant can read — then the AI can query your data directly.
How it works: Bruin CLI introspects your warehouse and generates asset files with schema, column descriptions, and domain context. Bruin MCP connects this to your AI tool, giving it direct query access.
No vendor lock-in, no SaaS dependency — just open-source tools you run locally.
▶ Watch the tutorial: Claude + BigQuery for Finance →
What you'll build
By the end of this module you will have an AI agent that connects to your data warehouse, understands your schema and business terms, and answers questions with real SQL queries.
The core setup takes about 1–2 hours (Steps 1–5), depending on the size of your database and how much troubleshooting is needed. The AI enhance step (Step 3) alone can take several minutes for larger schemas. Step 6 covers optional ways to enrich your context further — you can skip it initially and come back later.
Before you start
- Bruin CLI installed
- A data warehouse with data already loaded (BigQuery, Redshift, ClickHouse, or Postgres)
- An AI coding tool installed (Cursor, Claude Code, or Codex)
Create a Bruin Project
Initialize a Bruin project — the local workspace that will hold your database metadata, quality checks, and agent context.
Connect Your Data
Add your data warehouse as a connection so Bruin can reach your tables and the AI agent can query them.
Build Your Data Context
Import your database schema and enrich it with AI-generated descriptions, quality checks, and tags — so the agent actually understands your data.
Set Up Your AI Agent
Connect Bruin to your AI coding tool via MCP so the agent can read your data context and query your warehouse.
Analyze Your Data
Create an AGENTS.md with domain-specific context, then put your AI analyst to work answering real business questions.
Improve Your Context
Go further with a Bruin Glossary for shared business definitions and external MCP servers like Notion or Confluence to pull in even more domain knowledge.