Sitemap
The Airbnb Tech Blog

Creative engineers and data scientists building a world where you can belong anywhere. http://airbnb.io

Follow publication

Supercharging Apache Superset

9 min readFeb 9, 2021

--

Introduction

By the Numbers

How We Scaled Superset

Cache Warmup Job

Domain Sharding

Database Engine Load Management

Where Superset Really Shines

Metric Explorer

The Metric Explorer UI, showing highlighted metrics in cards with line charts, and other metrics in a table
Figure 1: Metric Explorer illustrating a collection of metrics powered by @superset-ui.
A single metric view in Metric Explorer, with Y/Y comparisons on the line chart and metadata available in the side pane
Figure 2: Metric Explorer illustrating a single metric where the header and left hand panel are powered by @superset-ui. Purposefully, Metric Explorer has limited slice-and-dice functionality, thus a link to Superset is also provided for more advanced analytics.

Security Manager and Data Access Policy Integration

The user is blocked from viewing data in Superset Explore view because they do not have permission to access this datasource.
Figure 3: A user is denied access if they do not have the relevant permissions to access either a datasource or a metric. Access can be requested in place (Figure 4).
A modal where the user can request access to protected data, with information about who will approve their request
Figure 4: The modal for requesting access to a restricted datasource or metric. In addition to being provided a reason, the approvers are also informed of the context for the request — i.e., which chart or dashboard the user is trying to access.
The user is now waiting for approvers to give them access to the datasource that backs this chart.
Figure 5: If the user is denied access but has a pending request the state of the request (which may require multiple approvers) is shown.

Metrics for the Masses

The popover for viewing metrics from Minerva in Superset. 1000 dimensions for grouping by are available.
Figure 6: The Superset query panel and metric popover for the Minerva virtual datasource containing an immense number of metrics and dimensions. Given the vastness of the datasource, most metric-dimension combinations would be invalid without adding custom logic to determine the feasible subset (Figure 7). Numbers are shown for illustrative purposes only.
After selecting a metric, only 100 dimensions are available for grouping by, followed by only 50 after selecting another dim.
Figure 7: The Superset query panel. By selecting the bookings metric, the viable set of dimensions has reduced from 1,000 to 100. Furthermore, by grouping by the dim_origin_city dimension, the viable set of dimensions further reduced to around 50 because the increased specificity had reduced the set of feasible Apache Druid datasources. Numbers are shown for illustrative purposes only.

Conclusion

Acknowledgments

--

--

The Airbnb Tech Blog
The Airbnb Tech Blog

Published in The Airbnb Tech Blog

Creative engineers and data scientists building a world where you can belong anywhere. http://airbnb.io

Erik Ritter
Erik Ritter

Written by Erik Ritter

Full Stack Software Engineer focusing on TypeScript + ⚛

Responses (3)