Scan PostgreSQL and MongoDB databases, discover table schemas, compute statistical summaries (df.describe), and get LLM-powered Exploratory Data Analysis -- all through a Streamlit UI or standalone scripts.
cd schema_discovery_eda
uv venv
source .venv/bin/activate
uv pip install -r requirements.txt- PostgreSQL running on
localhost:5432 - MongoDB running on
localhost:27017 - Ollama running on
localhost:11434(or any OpenAI-compatible LLM server)
Quick start with Docker:
docker run -d --name postgres_banking -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=banking_db -p 5432:5432 postgres:16
docker run -d --name mongo_banking -p 27017:27017 mongo:7streamlit run app.pyOpens at http://localhost:8501. Features:
- Add multiple database connections (PostgreSQL / MongoDB)
- View discovered schemas in table or JSON format
- View
df.describestatistics for every table - Editable system prompt in the sidebar
- Streaming LLM response for EDA analysis
- View the exact prompt sent to the LLM
python setup_test_data.pyCreates banking_db in PostgreSQL (5 tables) and banking_mongo in MongoDB (5 collections) with sample banking data.
python schema_discovery.py # saves to schema_output.json
python schema_discovery.py my_output.json # saves to custom pathpython llm_eda_request.py # reads schema_output.json
python llm_eda_request.py my_output.json # reads custom pathEdit OGX_BASE_URL and MODEL at the top of llm_eda_request.py if your LLM server or model differs.
schema_discovery_eda/
├── app.py # Streamlit UI
├── schema_discovery.py # Scan PostgreSQL + MongoDB schemas
├── llm_eda_request.py # Send schema to LLM for EDA (CLI)
├── setup_test_data.py # Seed both databases with banking test data
├── schema_discovery_eda_demo.gif # README demo (animated)
├── requirements.txt # Dependencies
└── README.md
