Re:dash — Open Source BI tool

Iqbal Singh
3 min readAug 17, 2021

--

Old days of querying the data on a black terminal or pulling into an Excel sheet for analysis are long gone. Data visualization (data viz) has changed the way we look into data. It is way easier to make sense out of numerous data by mapping the data points with graphical elements and there are tons of tools available in the market.

Redash

is an open-source tool for querying and visualizing the data using SQL queries. Redash

  • Comes with a number of graphical visualizations out of the box.
  • Support 20+ different data sources.
  • Supports data joins across multiple data sources.
  • Can be self hosted using the Docker Compose or K8s Helm charts.
  • Supports SAML authentication for single sign-on for users.
  • Is very flexible as users can add new visualizations to extend the tool set if required by their project.

We will be looking into Redash v10-preview version in this article.

Pre- Requisite

  • Docker Compose is required on the machine.
  • Remote PostgreSQL database is required for Re:dash state management.

Docker-Compose

You can set up re-dash easily in a docker containers. I will go through the details for setting up the docker container for re-dash.

  • I am using external PostgreSQL DB installation on a remote server, to keep the state intact after the containers are down.
  • You will need to JDBC connection String in below format for connecting to postgres database. (Update in the redash.env file)
postgresql://<username>:<pwd>@<host>/<database>
  • Put both compose and env file in same directory.

Compose File

# This configuration file is for the **development** setup.
# For a production example please refer to getredash/setup repository on GitHub.
version: "2.2"
x-redash-service: &redash-service
image:
redash/redash:preview
env_file:
"redash.env"
services:
server:
<<: *redash-service
command: server
depends_on:
- redis
ports:
- "5000:5000"
- "5678:5678"
environment:
REDASH_WEB_WORKERS: 4
scheduler:
<<: *redash-service
command: scheduler
environment:
QUEUES: "celery"
WORKERS_COUNT: 1
scheduled_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "scheduled_queries"
WORKERS_COUNT: 1
adhoc_worker:
<<: *redash-service
command: worker
environment:
QUEUES: "queries,schemas"
WORKERS_COUNT: 2
redis:
image: redis:latest
restart: unless-stopped
nginx:
image: nginx:latest
ports:
- "5001:80"
depends_on:
- server
links:
- server:redash
restart: always

redash.env

REDASH_HOST=http://localhost/redash
PYTHONUNBUFFERED=0
REDASH_LOG_LEVEL=INFO
REDASH_REDIS_URL=redis://redis:6379/0
REDASH_COOKIE_SECRET=redash-selfhosted
REDASH_SECRET_KEY=redash-selfhosted
REDASH_DATABASE_URL=postgresql://<username>:<pwd>@<host>/<database>
  • Put both docker compose and redash.env files in the same directory.
  • Create DB schema for the redash state & Start the docker containers.
docker-compose run --rm server create_db
docker-compose run up -d
Starting up the Docker containers

User Interface

Redash is built around the concept of Queries and Dashboards. Users can create SQL queries & create visualizations. Once the user has finalized the query it can be added to a dashboard. Multiple queries can be added to a single dashboard.

Home page lists the user bookmarked dashboards and queries for quick access.

Redash Home Page.
  • Create the Queries and Dashboards by following the links on the home page.

Demo Dashboard

Thanks for reading, please feel free to reach out to me if you have any questions.

--

--