Skip to main content

Superset Reporting Platform: A Comprehensive Guide to Utilization


1. Introduction

Welcome to the Superset Reporting Comprehensive Training! This documentation aims to provide in-depth guidance on leveraging Apache Superset for effective reporting and data visualization.


2. Getting Started

Accessing Superset

Open your preferred web browser (Google Chrome, Firefox, Safari).

Navigate to the Superset URL provided by your administrator.

Log in using your credentials.

User Permissions

Ensure that your user account has the necessary permissions to perform the following tasks:

  • Access and use the SQL Lab.

  • Create and modify datasets.

  • Create, modify, and save charts.

  • Create and modify dashboards.

  • Contact your administrator if you encounter any permission-related issues.


3. Creating SQL Queries

SQL Lab

The SQL Lab is a powerful tool for executing and analysing SQL queries. Follow these steps:

  • Navigate to the "SQL Lab" section in the main menu.

  • Click on "New Query" to open the SQL editor.

  • Write your SQL query in the editor.

  • Execute the query to view results.

Tips for SQL Lab:

Utilize syntax highlighting and autocomplete features in the SQL editor.

Use the "Query History" tab to revisit and rerun previous queries.

You can save your queries under “ SQL” Saved Queries for future reference and usage

4. Building Datasets

Dataset Basics

Building datasets in Superset using SQL Lab provides a flexible approach. Follow these steps:

  • Open the "SQL Lab" section in the main menu.

  • Click on "New tab" to open the SQL editor.

  • Write a SQL query that defines your dataset, including fields and any necessary filters.

  • Execute the query to ensure it returns the desired data.

  • Click on the “Create Chart” button below.

  • On the next screen click  Create a dataset to edit or add columns and metrics.

  • Specifying the necessary details  of the dataset and save


Tips for Building Datasets:

Leverage the power of SQL to manipulate and shape your data directly.

Regularly check the query preview to ensure your dataset reflects the desired structure.


5. Creating Charts
Chart Basics

Charts in Superset visualize data from datasets. Follow these steps to create a basic chart:

  • Go to the "Charts" section in the main menu.

  • Click on "New Chart" and choose your dataset.

  • Select the chart type (e.g., bar chart, line chart, table, big number) and configure the axes.

  • Save Chart


Chart Types

Superset offers a variety of chart types. Explore and choose the one that best suits your data:

  • Bar Chart: Compare values across categories.

  • Line Chart: Display trends over time.

  • Pie Chart: Show proportions of a whole.

  • Scatter Plot: Visualize relationships between two variables.


Another common way to create a chart is by following the steps of creating  a dataset until you click on the “Create Chart”.  Under the data tab select the kind of chart representation you want to use e.g a table, chart or big number.

When creating charts in Superset, you can choose between two query modes: "Aggregate" and "Raw Records." Each mode offers distinct advantages and is suitable for specific use cases.

1. Aggregate Mode

Purpose: Aggregate mode is ideal for summarizing and aggregating data.

Use Cases: Use this mode when you want to visualize data trends, averages, counts, or other aggregated metrics.

Example: If you have a dataset with daily sales data, aggregate mode can help you visualize the total sales for each month.

How to Use: When creating a new chart, select the dataset.

Choose the appropriate chart type for aggregation (e.g., bar chart, line chart).

Drag and drop fields into the "Group by" and "Metrics" sections to define how data should be aggregated.

Tips:

Aggregate mode is efficient for large datasets, as it summarizes data before rendering the chart.

Utilize this mode when focusing on overall trends and patterns.


2. Raw Records Mode

Purpose: Raw records mode is suitable for visualizing individual data points without aggregation.

Use Cases: Use this mode when you need to examine and visualize each record in the dataset individually.

Example: If you have a dataset containing details of each customer transaction, raw records mode can help you visualize each transaction separately.

How to Use: Choose "Raw Records" as the query mode when creating a new chart.

Select the appropriate chart type that supports displaying raw records (e.g., table, scatter plot).

Configure the chart by choosing fields relevant to individual records.


Tips:

Raw records mode is beneficial when exploring detailed data points and relationships.

Suitable for smaller datasets or scenarios where individual records are crucial.

Selecting the Right Mode

Consider Your Data: Choose the query mode based on the nature of your data and the insights you seek.

Performance: Aggregate mode is often more performant with large datasets, while raw records mode provides detailed granularity.


Chart Type Compatibility: Some chart types work better with specific query modes. Experiment to find the best fit for your visualization needs.

By understanding and leveraging these query modes, you can create charts that effectively convey insights from your data, whether you're focusing on aggregated trends or exploring individual records.



6. Customizing Charts

Customize your charts to enhance their visual appeal and clarity:

Edit your chart to access customization options.

Adjust colors, labels, and other settings to improve readability.


Tips for Creating Charts:

  • Experiment with different chart types to find the most effective representation for your data.

  • Utilize tooltips and legends to provide additional information.


7. Building Dashboards

Dashboard Layout

Dashboards in Superset allow you to combine multiple charts and visualizations. Follow these steps to create a dashboard:

  1. Open the "Dashboards" section in the main menu.

  2. Click on "New Dashboard" and define the layout.

 Adding Charts to Dashboards
  • Drag and drop charts onto the dashboard canvas.

  • Resize and arrange charts to create an appealing layout.

Dashboard Interactivity

Enhance your dashboard's interactivity to provide a dynamic user experience:

Enable interactivity by adding filters and parameters.

To include filters, proceed as follows:

  • Select the filter icon located at the upper left corner of the dashboard to open the sidebar.

  • Click the "Add/Edit Filters" button.

  • Input the filter type and name.

  • Choose the dataset and the corresponding column for the filter.

  • Save your changes.

You can now use the filters in your dashboard.

Tips for Building Dashboards:

Use consistent color schemes and fonts for a professional and cohesive dashboard.