Skip to content
Back to full roadmap
topicadvanced

Data Analyst Agents (SQL + viz)

Natural language → SQL → execute → generate charts. Answer 'this month's sales trend?' with one prompt.

3 hours1 resources

Pipeline:

  1. Schema (DDL + sample rows) in context
  2. NL → SQL generation
  3. Execute on sandbox DB (SELECT only)
  4. Result interpretation
  5. Chart generation (Plotly, Vega-Lite spec)
  6. Insight summary

Defense: limit SQL injection — agent should have read-only replica only. DROP/DELETE/UPDATE blacklist.

Vendors: Vanna.ai, DataChat, Hex Magic, Mode AI. Power BI / Tableau "Copilot" features follow this pattern.

Resources(1)