7 ms·
Show HN: Django SQL Dashboard
- numlocked 6y agoVery cool! I wrote Django SQL Explorer[0], and this looks very similar in spirit, but an emphasis on visualization that Explorer does not have (to the extent it has a focus, it's more on providing a reasonable way to write complex queries and re-use them). These types of tools are extremely handy. [0] https://github.com/groveco/django-sql-explorer https://github.com/groveco/django-sql-explorer
- simonw 6y agoI'm embarrassed to say I hadn't run across django-sql-explorer when I started working on this - that could have saved me a bunch of time, it looks really good! That said, part of my rationale for building this was as a learning and research exercise since I need to learn more about read-only PostgreSQL for my Datasette project. Definitely looking forward to cross-pollinating ideas. I agree, having access to this kind of interface is a massive productivity boost.
- spapas82 6y agoI'm a happy Django sql explorer user (and small contributor) and I would like to say thank you for this project and totally recommend it to everybody! Django sql explorer makes it really easy to add arbitrary sql querying to your project with various other goodies!
- StavrosK 6y agoI have used Django SQL Explorer and it's fantastic, thank you for your work! It worked very well and is a great way to allow people to perform read-only queries, save them, run them later, etc. It was great for allowing non-technical people to quickly read data from the database.
- bytesmith 6y agoI use Django SQL Explorer pretty much every day. It's been wonderful for my needs. I'm also very happy to see django sql dashboard as an alternative and in particular the dashboard features like vega chart and markdown integration. I will definitely check this out. Thanks to both of you!
- uk123 6y agoDoes django sql explorer work with a snowflake database?
- simonw 6y agoThis is my new project that adds an interactive read-only SQL querying interface to any Django+PostgreSQL project. The interface is protected by Django authentication: you can execute one or more SQL queries, copy the URL and share it with your collaborators on that project. You can also create a saved dashboard and make that available to the wider world. Here are a couple of examples of saved dashboards that I'm running on my personal blog: https://simonwillison.net/dashboard/tag-cloud/ https://simonwillison.net/dashboard/tag-cloud/ https://simonwillison.net/dashboard/code-examples/?search=regexp_match https://simonwillison.net/dashboard/code-examples/?search=re...
- nickphx 6y agoNice work, thanks for sharing. The ability to create visualizations is a great feature.
- stuartbman 6y agoNaive question from someone with a superficial understanding of Django- I thought the advantage of Django was to abstract away from SQL through Class/Model so you don't need to write these queries? I can't quite tell what the use case would be here
- berto4 6y agoThis tool is aimed at mainly administrative folks who want to understand what's going on in their app/company by looking directly at data. Those folks are usually sql oriented, and you can build any ad-hoc query to do pretty deep analysis in sql. That's why being able to visualize things is also key here. Usually you'd do this in an OLAP db but this is a nice "poor mans" way for at least checking out what's going on without switching too much context.
- tclancy 6y agoYeah, this would have replaced a fairly expensive SaaS subscription at my old job which simply allowed business-side folks the ability to run SQL queries safely (in theory).
- simonw 6y agoThis is all about ad-hoc reporting - it's basically a very lightweight business intelligence tool. The key feature here is that you can build a new report without having to write any Python/Django code at all.
- artiscode 6y agoAmazing project! It's the tool that I've been missing for many years. I was a contractor for almost 7 years and most of my clients were small companies that were paying for software to avoid hiring extra staff that would crunch numbers and tell what they mean. Setting up a dedicated BI tool is often overkill, compared to the actual reporting a small business needs. This is the perfect tool for a Djangonaut to set up raw SQL queries and allow users to interact with them. edit: Added Djangonaut mention
- pyrophane 6y agoReading the docs it looks like if you have a read-replica of your primary database you could set `EXPLORER_CONNECTIONS` to only contain the read-replica and achieve some additional safety that way. Read replicas are pretty easy to set up with most managed database products (Cloud SQL, AWS RDS), so that would be a very lightweight way to add some ad-hoc querying capabilities in prod that won't keep you up at night.
- TruthWillHurt 6y agoI guess phpMyAdmin is out of fashion these days ;)
- dacox 6y agoThis looks great! In a similar vein - does anyone know of a project that will allow for a Django shell in the browser? I know Jupyter exists - but a solution like this with the permissions would be valuable.
- photojosh 6y agoThat is an excellent idea. The number of times I've fired up an SSH shell on my phone to do a quick fix for a client...
- westurner 6y agoThis launches the web-based Werkzeug debugger on Exception: pip install django-extensions python manage.py runserver_plus https://django-extensions.readthedocs.io/en/latest/runserver_plus.html#usage https://django-extensions.readthedocs.io/en/latest/runserver... This should run IPython Notebook with database models already imported : python manage.py shell_plus --notebook But writing fixtures, tests and (celery / dask-labextension) tasks is probably the better way to do things. Django-rest-assured is one way to get a tested REST API with DRF and e.g. factory_boy for generating test data.
- pgt 6y agoMetabase – https://www.metabase.com/ https://www.metabase.com/
- coder13 6y agocool
- stanislavb 6y agoSeems nice. And, if you are in the Ruby (on Rails) ecosystem, I can highly recommend Blazer https://github.com/ankane/blazer https://github.com/ankane/blazer
- legostormtroopr 6y agoIf you don't want to give your users direct access to your database using SQL, I wrote a little tool that basically exposes the ORM as a user interface and lets users query that way. https://github.com/Aristotle-Metadata-Enterprises/django-data-interrogator https://github.com/Aristotle-Metadata-Enterprises/django-dat...
- roywiggins 6y agoThis is cool! I've had a lot of success with http://redash.io http://redash.io, which is a similar (though much more complex) project. SQL backend +visualizations can be really powerful and surprisingly flexible for building dashboards that aren't quite ad-hoc, but don't deserve their own standalone app and you just need to tie some input fields into SQL parameters.
- avinassh 6y agoI love the minimal design. Which CSS framework do you use? Or is it self created? The buttons also reminded me of Goat Counter which also employs the minimal CSS things
- simonw 6y agoIt's hand-written CSS - there's not much of it: https://github.com/simonw/django-sql-dashboard/blob/01bb7e6088ce5a920db3e00347791bf96082ee91/django_sql_dashboard/templates/django_sql_dashboard/_css.html https://github.com/simonw/django-sql-dashboard/blob/01bb7e60...