Build data analyst dashboard using Data Warehouse

- 6 mins

Continuing the series of articles on the Data Warehouse topic, today we will come to a quite interesting content which is building a Data Analysis Dashboard on the Data warehouse. Building a Data Analysis Dashboard is one of the most basic functions in BI (Business Intelligence) activities, helping to visualize data in the form of charts, thereby helping users to easily understand and see insights from the data.
You can use Chainslake, a blockchain data warehouse that allows users to query blockchain data, build and share blockchain data analysis dashboards completely free of charge.

Contents

  1. Overview of Metabase
  2. Install and configure Metabase to connect to Data warehouse
  3. Data tables in data warehouse
  4. Query data, build and share dashboard
  5. Conclusion

:pray: I am currently consulting, designing and implementing data analysis infrastructure, Data Warehouse, Lakehouse for individuals and organizations in need. You can see and try a system I have built here. Please contact me via email: lakechain.nguyen@gmail.com. Thank you!

Overview of Metabase

Metabase is a BI tool that allows querying data using SQL language on many different databases and SQL engines through plugins, presenting query results into tables, charts, data on analytical dashboards, you can see a demo dashboard of mine here.

Metabase has both an Opensource version with basic functions that can be installed on existing infrastructure and an Enterprise version with advanced functions that can be used directly on Metabase’s cloud or self-hosted via a license key. You can see details here.

Install and configure Metabase to connect to Data warehouse

I will install the Opensource version of Metabase via docker and connect to our DWH cluster via Trino (you can review my article on how to install Trino here)

First, I will create a database for Metabase in postgres on the DWH cluster

postgres=# CREATE DATABASE metabase;

Install metabase via Docker

$ wget https://github.com/starburstdata/metabase-driver/releases/download/5.0.0/starburst-5.0.0.metabase-driver.jar
$ docker run -d -p 3000:3000 --name metabase \
  --network hadoop --add-host=node01:172.20.0.2 \
  -e "MB_DB_TYPE=postgres" \
  -e "MB_DB_DBNAME=metabase" \
  -e "MB_DB_PORT=5432" \
  -e "MB_DB_USER=postgres" \
  -e "MB_DB_PASS=password" \
  -e "MB_DB_HOST=node01" \
  -v starburst-5.0.0.metabase-driver.jar:/plugins/starburst-5.0.0.metabase-driver.jar \
   --name metabase metabase/metabase

Note 172.20.0.2 is the container ip of node01 on my machine, you replace it with your machine ip.

Access http://localhost:3000 you will see the Metabase startup interface, after creating an admin account you will be taken to the main working interface of Metabase.

Metabase intro

To connect to Trino, go to Admin settings, select the Databases tab, select Add database and set it up as shown below:

Connect to Trino

After configuring, Exit admin and check if there is data in Browser/Databases. You can see Chainslake’s data tables here

Chainslake data

Data tables in the data warehouse

In this section, I will briefly describe the data tables in the data warehouse of Chainslake to have a basis for writing queries and building dashboards in the next section.

Chainslake’s data warehouse includes many folders, each folder includes many tables with the same topic, specifically I will introduce some of the following tables and folders:

Query data, build and share dashboards

Writing queries and building dashboards on Chainslake is quite simple if you already have SQL skills. I have created a dashboard in the collection Demo so you can understand and easily start creating your own analytical dashboards.

Demo collection

Demo dashboard

Some notes when writing queries:

Conclusion

Above are my shares on how to build a data analysis dashboard on a data warehouse, I hope to receive support from all of you. See you again in the next articles.

Lake Nguyen

Lake Nguyen

Founder of Chainslake

comments powered by Disqus