Page tree
Skip to end of metadata
Go to start of metadata

1.Overview

Superset is an open-source modern data exploration and visualization platform.

Link: https://insight.galaxyedu.io/superset/welcome/

2. How to build dashboard

Step 1: Query to get data → Save dataset

  1. Choose database, schema
  2. Write code SQL to get data
  3. Run to check your result
  4. Click button beside "Save"
  5. Save dataset
  6. Save as new or Overwrite existing

Database

Schema

Description

CORE

icanid

merchant, users

icanpayment

bank transfer, billing, transaction

subscription

Product plan

ICAN Kid

icankid

Link

Report

user_report

cash in, paid user 4 BUs


Step 2: Create dashboard

Step 3: Create new chart

  1. Choose a dataset (step 1)
  2. Choose chart type
  3. Click button Create New chart
  4. Add the name of chart, select time range, metrics, filters,...
  5. Save

Step 4: Edit dashboard

  1. Click button Edit dashboard
  2. Drag and drop to edit chart size and position
  3. Discard or Save your chart.

Step 5: Share

Share the dashboard by generating a public or private URL, or embed it in other web applications.

3. Dashboard

3.1. View

3.1.1. Choose dashboard

  1. Click dashboards on toolbar.
  2. Search title or filter by owner, created by, status,...
  3. Click Choose dashboard to view

3.1.2. Filter

  1. After choose dashboard, select Filters on left-side bar
  2. Apply filters

3.1.3. View query

On current dashboard, choose the chart → Click View query

3.1.4. Download data from chart

  1. Choose the chart you would like to download
  2. Select Export to .CSV or Download as image

3.2. Edit

  1. Click button Edit dashboard
  2. Create, Edit, Delete charts
  3. Discard or Save

3.3. Create

  1. Click dashboards on toolbar
  2. Click button Add dashboard
  3. Set title dashboard, create new chart...
  4. Save

4. Chart

4.1. View

4.1.1. Choose chart

  1. Click Charts on toolbar
  2. Search or filter
  3. Choose chart you would like to view

4.1.2. Filter

  1. Click box Time range
  2. Select range type
  3. Apply
  4. Select column at Filters
  5. Click button Update chart

Note: Please do not save if you only want to view the chart.

4.2. Create

  1. Click Charts on toolbar
  2. Click button Add chart
  3. Choose a dataset
  4. Click button Create new chart
  5. Add name, time column, metrics, filters and customize

5. Query

  1. Click SQL on toolbar



  1. Select database
  2. Select schema
  3. Write code SQL to get data
  4. Select limit
  5. Click button Run

Optional: 

  • Save query or Save dataset
  • Select "See table schema" to Preview table


Database

Schema

Description

CORE

icanid

merchant, users

icanpayment

bank transfer, billing, transaction

subscription

Product plan

ICAN Kid

icankid

Link

Report

user_report

cash in, paid user 4 BUs

6. Considerations when querying

Given Superset's shared usage, it's crucial to optimize queries and datasets while creating dashboards to ensure a seamless experience for all users

  1. Specify What You Need: Be clear about the data you need and only request the necessary fields to minimize the amount of data returned.

  2. Avoid SELECT *: Avoid using SELECT * as it retrieves all columns, which can be inefficient. Instead, explicitly list the columns you need.

  3. Filter Early: Apply filters and conditions early in your query to reduce the dataset size before any complex operations are performed.

  4. Use Joins Wisely: Be mindful of how you use joins, as they can be resource-intensive. Use INNER JOIN, LEFT JOIN, etc., as appropriate for your data relationships.

  5. Aggregate Smartly: When performing aggregations, consider the efficiency of GROUP BY and aggregation functions like COUNT, SUM, AVG, etc.

  6. Limit Results: Use the LIMIT clause to restrict the number of rows returned, especially when working with large datasets.

  7. Monitor Performance: Regularly monitor query performance, identify bottlenecks, and optimize slow queries.

  8. Avoid Nested Subqueries: Be cautious when using nested subqueries, as they can be complex and impact performance.

  9. Consider Data Types: Be aware of data types and conversions when filtering or manipulating data.

  10. Caching: Implement caching for frequently used queries to reduce database load.

Write a comment…