iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
💨

How to Export Redash

に公開

Perform export in response to Hosted Redash End of Life
https://redash.io/help/faq/eol

The official export tool provided is as follows:
https://redash.io/help/user-guide/integrations-and-api/api

Since it is designed to use
https://github.com/getredash/redash-toolbelt
I will bring it to my local machine for now.

git clone git@github.com:getredash/redash-toolbelt.git

It looks like it would run with Python, but it didn't work because of missing dependency libraries. Since dependencies are managed with a tool called Poetry, I will set it up.

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python -

https://github.com/python-poetry/poetry

Once you add the installation directory to your path, you can use the poetry command. However, since I likely only needed to run it once, I proceeded by specifying the full path. The sample code is described using poetry.

Running poetry install seemed like it would install the dependencies, but it failed, so I ran poetry update before poetry install. This is likely related to the following issue:
https://github.com/getredash/redash-toolbelt/issues/34

poetry run python ./redash_toolbelt/examples/query_export.py 'url' --api-key "<api-key>"

I was able to perform the export with this.

One point to note is that you should pass the URL as an argument. While some articles suggested writing it as query_export.py --redash-url \"https://app.redash.io/<slug>\" --api-key \"<api-key>\", that did not work.


There seem to be other tools like the following, but I've tried the official tool for now.
https://github.com/oieioi/redash_exporter


Also, it seems a migration script from Hosted Redash to Self-Hosted Redash is currently in progress below.
https://github.com/getredash/redash-toolbelt/pull/23

Discussion