explorerhq/django-sql-explorer

Easily share data across your company via SQL queries.

analytics
django
python3
sql

Documentation Status

Latest Version

Downloads

License

SQL Explorer

Video Tour:

inline-image

SQL Explorer aims to make the flow of data between people fast, simple, and confusion-free. It is a Django-based application that you can add to an existing Django site, or use as a standalone business intelligence tool. It will happily connect to any SQL database that Django supports.

Quickly write and share SQL queries in a simple, usable SQL editor, view the results in the browser, and keep the information flowing!

Add an OpenAI (or other provider) API key and get an LLM-powered SQL assistant that can help write and debug queries. The assistant will automatically add relevant context and schema into the underlying LLM prompt.

SQL Explorer values simplicity, intuitive use, unobtrusiveness, stability, and the principle of least surprise. The project is MIT licensed, and pull requests are welcome.

Some key features include:

  • Support for multiple connections
  • AI-powered SQL assistant
  • Quick access to schema information to make querying easier (including autocomplete)
  • In-browser pivot tables (which can also be shared via URLs)
  • Ability to snapshot queries on a regular schedule, capturing changing data
  • Query history and logs
  • Quick in-browser statistics, pivot tables, and scatter-plots (saving a trip to Excel for simple analyses)
  • Basic code-completion in the SQL editor
  • Parameterized queries that automatically generate a friendly UI for users who don\'t know SQL
  • A playground area for quickly running ad-hoc queries
  • Send query results via email
  • Saved queries can be exposed as a quick-n-dirty JSON API if desired
  • ...and more!

Screenshots

Writing a query and viewing the schema helper

image

Using the SQL AI Assistant

image

Viewing all queries

image

Query results w/ stats summary

image

Pivot in browser

image

View logs

image

Development

Included is a test_project that you can use to kick the tires. You can run this via docker compose up

You can now navigate to 127.0.0.1:8000/explorer/, log in with admin/admin, and begin exploring!

This will also run a Vite dev server with hot reloading for front-end changes.

Stars
2682
17.67% more than last month
Forks
355
Open Issues
25