Skip to main content
The Superset hands-on examples page demonstrates how to use Superset. It includes two examples, running a query and creating charts and dashboards.

Run a query

Generally, when using SQL Lab to run a query, you take the following steps:
  1. Select a catalog, schema, and table.
  2. Enter a query and run it. Superset displays all available tables.
Assume you entered a query that does the following:
  • Selects unique employee IDs and first names
  • Orders the results by employee ID in ascending order
  • Limits the results to 50 rows
SELECT DISTINCT employee_id, first_name
FROM employees1
ORDER BY employee_id ASC
LIMIT 50
There are some important things to know when trying to understand your result.
  • On Superset, this query would generate a table preview.
    03-query-preview

    SQL Lab query example
  • If you’d rather create a table or view, you can click the dropdown menu beside Run. It provides an option to create a table or view.
    04-create-a-table-or-view

    Create a table or view
  • After running the query, the results appear in a table format.
    05-query-result

    Query result
  • You can also view a history of when you ran these queries.
    06-query-history

    Query history

Create a dashboard

You can create charts and dashboards in Superset to explore and visualize your data. Follow these steps to create a line chart and dashboard:
  1. From the Superset navigation bar, click Charts and select + Chart to create a new chart.
  2. Choose the dataset you want to visualize.
  3. Choose a chart type, for example, Line Chart, and click Create New Chart.
  4. Configure the chart:
    • Set the X-axis.
    • Set the Metrics.
    • Optional: Add filters or groupings as needed.
  5. Click Create Chart to preview the chart.
  6. Click Save, enter a chart name, select or create a dashboard, and click Save & Go to Dashboard.
The following images show what the chart creation process looks like and the outcome of adding the chart to a dashboard.
07-creating-a-chart

Creating a chart in Superset
08-created-dashboard

Dashboard created from the chart

Additional resources

  • To get an overview of Superset, refer to the Superset in NexusOne page.
  • For more details about Superset, refer to the Superset official documentation.
  • To learn more about how NexusOne uses KeyCloak and Trino, refer to the NexusOne KeyCloak and Trino documentation.