[HN Gopher] Show HN: Django SQL Dashboard
       ___________________________________________________________________
        
       Show HN: Django SQL Dashboard
        
       Author : simonw
       Score  : 149 points
       Date   : 2021-05-10 15:53 UTC (7 hours ago)
        
 (HTM) web link (django-sql-dashboard.datasette.io)
 (TXT) w3m dump (django-sql-dashboard.datasette.io)
        
       | TruthWillHurt wrote:
       | I guess phpMyAdmin is out of fashion these days ;)
        
       | numlocked wrote:
       | Very 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
        
         | simonw wrote:
         | I'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 wrote:
         | I'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!
        
         | bytesmith wrote:
         | I 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!
        
         | StavrosK wrote:
         | I 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.
        
       | simonw wrote:
       | This 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/code-examples/?search=re...
        
         | vidar wrote:
         | Using the Django auth is neat, how would you compare this to
         | Metabase?
        
           | simonw wrote:
           | It's a lot less sophisticated than Metabase!
        
       | coder13 wrote:
       | cool
        
       | stuartbman wrote:
       | Naive 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
        
         | simonw wrote:
         | This 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.
        
         | berto4 wrote:
         | This 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 wrote:
           | Yeah, 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).
        
       | stanislavb wrote:
       | Seems nice. And, if you are in the Ruby (on Rails) ecosystem, I
       | can highly recommend Blazer https://github.com/ankane/blazer
        
       | dacox wrote:
       | This 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 wrote:
         | That 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...
        
       | pgt wrote:
       | Metabase - https://www.metabase.com/
        
       | artiscode wrote:
       | Amazing 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 wrote:
       | Reading 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.
        
       | nickphx wrote:
       | Nice work, thanks for sharing. The ability to create
       | visualizations is a great feature.
        
       ___________________________________________________________________
       (page generated 2021-05-10 23:01 UTC)