Skip to content

vanna-ai/apache-druid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Vanna + Apache Druid (Local Setup)

This repo demonstrates how to connect the open source Vanna library to a locally running Apache Druid instance using SQLAlchemy and PyDruid.

🧠 What is Vanna?

Vanna AI is a lightweight, open-source Python library that translates natural language questions into SQL queries for your database.

🚀 What’s in this demo?

  • Runs Apache Druid locally (via its quickstart)
  • Connects Vanna to Druid using the pydruid SQLAlchemy dialect
  • Lets you ask natural language questions and get back query results

📄 Files

  • vanna_druid.py: The full working example that:
    • Connects to a local Druid instance
    • Trains Vanna with a couple of example queries
    • Runs a natural language question end-to-end

⚙️ Prerequisites

  • Python 3.8+

  • Apache Druid running locally (use start-micro-quickstart)

  • Install required packages:

    pip install vanna openai sqlalchemy pydruid pandas chromadb

🧪 Run It

  1. Start Druid:

    export DRUID_SKIP_PORT_CHECK=1
    export DRUID_SKIP_JAVA_CHECK=1
    bin/start-micro-quickstart
  2. Run the Vanna example:

    python vanna_druid.py
  3. Ask natural language questions like:

    What are the top 5 most active Wikipedia channels?
    

🐳 Want to run it in the same network as Druid?

We can provide a Docker container that runs Vanna in the same network as your Druid deployment. Just reach out via GitHub Issues or vanna.ai.


🧠 Learn More

About

How to Connect Vanna Open Source to Apache Druid Using SQLAlchemy (Local Setup)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages