Remotely accessible re:dash CSV

Bryan Clark
2 min readAug 25, 2016

--

Here’s are instructions for accessing your re:dash data in CSV format externally from re:dash. This remote access allows you to work with your data in d3 or other visualization libraries.

In your query page copy the link for the “Download as CSV File” option under the “Download Dataset” button. You’ll need to right click on the download item and choose “Copy Link Address”.

Save this copied link somewhere like into a note pad application because we need to add more information to it before it can be used. The link should look something like this:

https://your.redash.io/api/queries/827/results/21705.csv

Now go to the bottom of your query page and click the “<> Embed” button.

Clicking this embed button opens up a popup where we can to copy the API key information and append it to our CSV URL.

Copy the highlighted selection of text in your popup as seen in the screenshot and append it to the end of your CSV URL. The end result will look like this:

https://your.redash.io/api/queries/827/results/217051.csv?api_key=9352fd37f2f4ce923932c9c6328829a5be7093ea3d

However this data will become stale

In re:dash when your query automatically updates you will receive a new result id number, in the this example the result id is 217051 while the query id is 827.

https://your.redash.io/api/queries/827/results/217051.csv?api_key=9352fd37f2f4ce923932c9c6328829a5be7093ea3d

To keep your CSV data updated to the latest results you’ll need to remove the result id number such that your URL looks like this.

https://your.redash.io/api/queries/827/results.csv?api_key=9352fd37f2f4ce923932c9c6328829a5be7093ea3d

With that you can get the latest values from your re:dash query. Previously I required some hacks to do a double query and I’m glad those are not necessary.

--

--

Bryan Clark

Director of Product Management @Timescale (previously @GitHub, @Mozilla, and @RedHat)