Superset is an open source dashboarding tool built by Airbnb developers and currently being incubated by Apache. It was selected as the data visualization component for the OLMIS reporting stack.
Data source - the Postgres (or other SQL) table that you want to view or build charts off of. You can view them via Sources --> Tables
Dimension - a field on each record defined in the data source that stores a particular data element (a column in a SQL database). Primarily used for Group Bys and for generating metrics. Viewable via the List Column tab in the data source editor
Metric - a calculation performed on a dimension in the data source. Viewable via the List Metric tab in the data source editor. By default, Superset will create a COUNT() metric which returns the count of all records in the data source, there are a couple of ways to create new metrics:
In the List Druid Metric tab of the data source editor, click the plus sign. Specify a data source, a metric name, verbose name, and JSON query that references metrics and dimensions available in the data source. More info on this in the General Configruation section below
Chart (fka "slice") - a visualization in Superset. Some of the key parts are:
Dashboard - a collection of charts on a single page. Most dashboards should include a Filter slice that lets the consumer restrict the results to a specific dimension, e.g. to a particular region
User - the unique login account which contains a username, password, and user roles. Note an administrator cannot currently change the password after initially creating the user
User role - a collection of security points that define the features and data sources in Superset that a particular user can access
Filters can be applied in a few places:
Security --> List Users shows the list of users (both active and inactive). To create a new user, click the plus sign in the top right and fill out the required fields. You're only allowed to create one user per email address entered. Superset recommends deactivating users instead of deleting them. Note an administrator cannot currently change the password after initially creating the user in Superset's UI. This is logged here:https://github.com/apache/incubator-superset/issues/4518#issuecomment-369900509. Instead, you need to do it in the fabmanager cli. To do this:
Users can be assigned to multiple roles, so it's recommended to have a few types of users (admin, power user = Alhpa, basic user = Gamma) and match those with data source-specific roles.
Security --> List User Roles shows the list of user roles available. The user role controls the features and data sources a particular user can access. Some useful security points:
To duplicate a user role, select the checkbox next to that role and under the Actions button at the bottom left, click the Copy button.
Check out Apache's documentation here for more info:https://superset.incubator.apache.org/security.html
It's useful to have a spare slice that you use specifically for testing, I usually preface it with my initials and call it something like CSC_testing so anyone else looking at Superset knows not to add it to a dashboard. That way, you avoid the risk of having someone mistakenly deploy something not PRD-ready.
To generate a .csv dump of all of the data in your data source, create a slice with visualization type "Table" and add every dimension available in the Group By field. If there are metrics that you want to see in this as well, include them. Run the query. Depending upon the size of your data set, this may take a little bit. Then, in the top right, click the .csv button to export the resulting table to .csv. This is really helpful for data validation.
You can generate an iframe for a particular slice by clicking the </> icon in the top right of the Slice Editor and embed that slice in a webpage.
When using a remote database you might need to reset the connection (by typing in the database URL and specifically the password afresh) to get aroundUnicodeDecodeError
reported by Superset