Superset#
Description:#
Business needs require analyzing operational data. Previously, we used Elasticsearch + Grafana. However, Grafana, being a time-series visualization tool, was not very effective for data mining and alerting. So, we started looking for a new open-source tool; and that's where Superset comes in.
Installation:#
Chose to install using Docker
Searched hub.docker.com and used the official method:
$ docker run -d -p 8080:8088 --name superset apache/superset
With your local superset container already running...
-
Setup your local admin account
$ docker exec -it superset superset fab create-admin \ --username admin \ --firstname Superset \ --lastname Admin \ --email [email protected] \ --password admin
-
Migrate local DB to latest
$ docker exec -it superset superset db upgrade
-
Load Examples
$ docker exec -it superset superset load_examples
-
Setup roles
$ docker exec -it superset superset init
-
Login and take a look -- navigate to http://localhost:8080/login/ -- u/p: [admin/admin]
-
Need to install an Elasticsearch plugin, as my database is Elasticsearch
$ docker exec -it superset pip install elasticsearch-dbapi
Trying it out#
Importing a data source: Elasticsearch
After logging in --> go to the top right corner and click on "Setting" --> "Database Connections"
On the new page --> click on the top right corner "+DATABASE" to find Elasticsearch. Add it according to the format.
elasticsearch+http://192.168.100.68:9200/
The following steps are:
- Create a Dataset; I understand it as a set of data extracted from the database based on a time format.
- Create charts.
- Add the charts to Dashboards.
Initially, the Elasticsearch data I imported did not have a timestamp and did not support sequential charts. The reason was that the date column in the imported data was recognized as a string format. After searching online, I found that I needed to format the date column as epoch_ms during the import process.
[Insert an image here]
However, my attempts were unsuccessful. In the end, I deleted the data source and added the Elasticsearch data source again.
Magically, the format recognized for the date column became Datetime. This solved all the problems.
In-depth exploration:#
Creating charts
1. Line, bar, and scatter plots#
-
These time series charts work fine.
-
The time range can be displayed with the chart. After adding it to Dashboards, the display can be adjusted within the selected time range.
-
Advanced options allow for time period segmentation. Options include sum, average, maximum, minimum, etc.
2. Pie charts#
-
They display normally and can only show data within the pre-selected time range.
-
Compared to line charts, they do not provide datetime selection.
-
Sunburst charts (a type of compound pie chart) can be selected, and they look good.
3. Other types of charts#
Other types of charts also work well. Most of them passed the tests.
Summary:#
Advantages:
- Supports Docker deployment, which I prefer.
- Supports various databases for import. Tested well with Elasticsearch.
- Offers a wide range of chart types, allowing for the creation of stunning dashboards.
Disadvantages:
- Dashboards do not support parameters. This means that time selection and conditional queries are not possible.
- The process of creating charts is cumbersome, requiring the creation of a Dataset after importing data.
- Charts can only be created based on pre-defined queries. It's quite rigid!
Overall, it's still a good tool, just not suitable for my needs. If you only need to analyze pre-defined data and create beautiful dashboards, it can be quite impressive!