Giter VIP home page Giter VIP logo

django-sql-explorer's Introduction

Documentation Status Latest Version Downloads License

SQL Explorer

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

https://sql-explorer.s3.amazonaws.com/5.0-query-with-schema.png

Using the SQL AI Assistant

https://sql-explorer.s3.amazonaws.com/5.0-assistant.png

Viewing all queries

https://sql-explorer.s3.amazonaws.com/5.0-query-list.png

Query results w/ stats summary

https://sql-explorer.s3.amazonaws.com/5.0-query-results.png

Pivot in browser

https://sql-explorer.s3.amazonaws.com/5.0-pivot.png

View logs

https://sql-explorer.s3.amazonaws.com/5.0-querylogs.png

Development

Included is a test_project that you can use to kick the tires. Just create a new virtualenv, cd into test_project and run start.sh (or walk through the steps yourself) to get a test instance of the app up and running.

You can now navigate to 127.0.0.1:8000/explorer/ and begin exploring!

django-sql-explorer's People

Contributors

anton-shutik avatar chrisclark avatar daneah avatar dependabot[bot] avatar dsanders11 avatar foobarquaxx avatar gosborn avatar grantmcconnaughey avatar havocbane avatar hugovk avatar jshwright avatar jtrain avatar lawson89 avatar lee-kagiso avatar lociii avatar marksweb avatar mattfisher avatar mluard-worthwhile avatar mounirmesselmeni avatar noazark avatar prattl avatar pre-commit-ci[bot] avatar raiderrobert avatar ramonsaraiva avatar robertofd1995 avatar spapas avatar timgates42 avatar tuffnatty avatar vinayinvicible avatar wjurkowlaniec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

django-sql-explorer's Issues

Make URLs more robust

Currently the app expects the form to post to /report/

The form/template should be flexible enough to work with any routing scheme.

Inclusion of % (in a LIKE clause) throws AttributeError

Including sql values like AND fieldname LIKE "%match%"

Throws: AttributeError. 'Cursor' object has no attribute '_last_executed'

If I python encode the percent signs, it works as expected.

AND fieldname LIKE "%%match%%"

It should be possible to enter the proper SQL syntax and have sql-explorer do the encoding needed.

Granular permissions

Is there an easy way to split permissions for execution and manipulation of queries? I'd like to give my staff users the right to execute saved queries but only admins should be able to change and save queries.

Thanks.

PyPI Release

Hey Chris,

do you plan to release an updated version on pypi anytime soon?
I don't really like to fetch my requirements from vcs repos :-)

Thanks, Jens

Downlaod CSV and parameterised queries

If I save and run a successful parametrised query. Download CSV does not download results of that successful query, instead I get an csv file with an error because the parameters are blank. I'm assuming that clicking 'Download CSV' is re-running a query rather than exporting the results of the successful run?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.