In our team we use redash quite extensively and we also use some of the graphs and dashboards for our customers. We wanted to manage the queries, visualizations and dashboards as code (as they really are). Hence we created a tool called redpush. It lets you define all in yaml and pushes it to your redash server. It requires some initial work, but then it is really nice because you can have it all automated from your CI/CD pipeline.

As probably there might be others in the same situation as we, we have open sourced it. You can find it here: https://github.com/comptelfwd/redpush

It is still far from perfect, as it has some issues still, but we already use it to manage all our production redash.

The tool uses (and abuses a little bit) the same API that the web frontend uses.

We hope it can help others to make their redash use a little easier

4 Likes

Hello ilbambino,

first of thanks a lot for sharing this, we were thinking about the necessity of having such a tool, really thankful for your work.

Editing the visualisations widgets in yml isn’t however something that would be very intuitive for us. I wish we could separate the sync of queries on one hand, and the edition of charts and co in the web.
Is that something that is doable with your tool? If not, how can we help? :slight_smile:

Thanks in advance,

Sixtine from JustWatch

I kind of agree that yaml isn’t the best way to have all those graphs. But we haven’t found yet a better way to do it. What we wanted is to version control them, and treat them as any other code (PRs, etc).

Our way of working is having two redash instances, in one we work and experiment, then we export the queries and graphs in yaml we use those as templates to be fed through a templating lib to the production redash. In that production there is only one user which can write queries (the one used by redpush from CI) and the other users have only read access. Hence the only way to change it is through the PR process.

And regarding the question, I think (I haven’t tested it though) if you create queries without graphs, they will work fine. Redash automatically adds a visualization that is the table view. And if you update one, if no visualizations are in the yaml redpush should not change the ones already available there. But as said I haven’t tested it.

amazing, thanks. I think that’s good enough to get started with !

1 Like

Is this tool helps me writing python code inside redash ??
if not how to import python library iside redash after making python as data source
thanks @arikfr @mat

should be contributed back to redash repo rather than being an external tool

Now I found it here on GitHub: GitHub - TripElephant/redpush: Tool to manage queries and dashboards from redash as source code

I just created an issue about that: https://github.com/getredash/redash/issues/4812

I juste created a post in Feature Requests category: Redpush to manage Redash queries as code, has Redash planned to create offical tool?