simonw / django-sql-dashboard

Django app for building dashboards using raw SQL queries
https://django-sql-dashboard.datasette.io/
Apache License 2.0
437 stars 37 forks source link

Ability to configure dashboards in code that lives in source control #34

Open simonw opened 3 years ago

simonw commented 3 years ago

Dashboard configurations that live in the database could get out of sync with the database design - especially if it is being actively iterated on.

An option where you can define your dashboards in source code - probably YAML - would enable people to keep the dashboards synchronized with changes made to their models, enforced by code review.

Could even have a testing mechanism which can attempt to render every configured dashboard and check that no SQL errors (e.g. from missing columns) are returned during the renders.

Given this mechanism, users could opt-out entirely of database-driven dashboards - or they could use both.

jefftriplett commented 3 years ago

YAML or even a Django setting would be nice.

A Django fixture isn't a terrible idea though either.

simonw commented 3 years ago

I've been resisting adding a JSON API for the data in a dashboard mainly because I get very nervous about API definitions that don't live in source control... but if I implement this feature that nervousness evaporates.