Chat With Your Data — Text2SQL Analytics
janga-ai/chat-with-your-data
Pergunte em português, obtenha SQL e gráficos em tempo real
Ver no GitHubInterface de analytics em linguagem natural que converte perguntas de negócio em SQL executável e gera gráficos automaticamente. Utiliza Claude Sonnet para geração de queries, Streamlit para a UI e suporta SQLite ou Databricks Delta Lake como backend de dados.
Instalação
npx convez-ai janga-ai/chat-with-your-data1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Executivos consultarem dados sem conhecer SQL
- Analistas de dados acelerarem exploração de datasets
- Dashboards self-service com análises ad-hoc
Veredito

Plugin prático e bem arquitetado que democratiza acesso a dados via linguagem natural. Claude Sonnet com loop de reflexão integrado reduz alucinações SQL; a geração automática de charts agrega valor real. Ideal para equipes que precisam de analytics self-service sem DBA envolvido.
README
A tradução para o português deste README ainda está na fila.
🔍 Chat With Your Data — Text2SQL Analytics
Ask business questions in plain English. Get live SQL results with charts — powered by Claude Sonnet.
🚀 Live Demo
🔗 chat-with-your-data.up.railway.app
📌 What It Does
Type a business question in plain English — Claude Sonnet converts it to SQL, runs it live against the database, and returns formatted results with an auto-generated chart.
Example questions:
- "Which manufacturer sold the most units in 2025-Q1?"
- "Average range by segment — SUV vs Sedan vs Truck"
- "Top 5 countries by total EV units sold"
- "How does Tesla's MSRP compare to BYD across quarters?"
- "Which models qualify for a government subsidy above $5,000?"
- "Monthly sales trend for Hyundai Ioniq 6 across all regions"
- "Countries with the highest average charging stations nearby"
- "Show battery capacity vs range for all models"
✨ Key Features
| Feature | Description |
|---|---|
| Natural Language → SQL | Claude Sonnet converts plain English to executable SQL |
| Schema-Aware Prompting | Delta Lake table schemas injected dynamically into Claude's context window — accurate multi-table joins, no hallucination |
| Error Reflection Loop | If SQL fails, Claude automatically receives the error and self-corrects — no user intervention needed |
| Auto Chart Generation | Claude picks the best chart type (bar, line, scatter, pie) based on the question and result shape |
| Query History | All queries and results persist in the session |
| CSV Export | One-click download of any result set |
🏗️ Architecture
User Question
│
▼
Schema Injector ──► Claude Sonnet (SQL Generation)
│
▼
SQL Query
│
┌────┴────┐
│ Execute │
└────┬────┘
Success?
╱ ╲
Yes No
│ │
│ Claude Sonnet
│ (Reflection Loop)
│ │
└─────┬──────┘
▼
Results + Auto Chart
🛠️ Tech Stack
- LLM: Anthropic Claude Sonnet — SQL generation + error reflection
- Frontend: Streamlit — chat UI, results table, session history
- Database: SQLite (mock demo) → Databricks Delta Lake (production)
- Charts: Matplotlib
- Deployment: Railway
📁 Project Structure
chat-with-your-data/
├── app.py # Streamlit UI — chat, results, charts
├── sql_generator.py # Claude API — SQL generation + reflection loop
├── schema_loader.py # Schema injector for Claude's context window
├── database.py # Query executor (SQLite / Databricks)
├── ev_mock_data.py # In-memory SQLite seed data (2,970 rows)
├── requirements.txt
├── Procfile # Railway deployment
└── .streamlit/
└── config.toml
⚡ Run Locally
# 1. Clone the repo
git clone https://github.com/limbarajjanga-spec/chat-with-your-data.git
cd chat-with-your-data
# 2. Install dependencies
pip install -r requirements.txt
# 3. Add your API key
echo "ANTHROPIC_API_KEY=your_key_here" > .env
# 4. Run
streamlit run app.py
Open http://localhost:8501
🔄 Switching to Databricks (Production)
- Install connector:
pip install databricks-sql-connector - Add env vars:
DATABRICKS_SERVER_HOSTNAME=your-workspace.azuredatabricks.net
DATABRICKS_HTTP_PATH=/sql/1.0/warehouses/your_id
DATABRICKS_ACCESS_TOKEN=dapi...
- Uncomment Databricks block in
database.py - Set
mode="databricks"inapp.py
Everything else — SQL generation, reflection, charts — works identically.
👤 Author
Limba Raj Janga
AI Engineer | Ex-ICICI Bank | IIT Kharagpur
LinkedIn · GitHub