Superset Training

Schema

Data Model for Requisition-based Reports

  • Flatten into four requisition tables, base tables
  • Create three materialized views from which the indicators are built, from base tables
  • All charts and dashboards can use the materialized views
  • The materialized views were created for the three requisition reports identified in Gap project

Indicator Queries

Created dashboards

Superset is not a report building tool, but a dashboard building tool

Report vs. dashboard

  • Report is entering parameters, then running a report
  • Dashboard is seeing all of the data immediately then filtering as needed

Can download a CSV from a SQL query

Superset overview

  • Sources → Tables, to see a list of tables in the postgres db


Translations

  • New dashboard labels would have to be manually updated in Superset
  • Only supports one label per column, we would have to choose one language for the dashboard


Materialized views continued

  • reporting_dates is populated using a CSV
  • Can add default filters in Edit Dashboard in JSON metadata
  • Row level filtering
    • Takes OpenLMIS permission strings and builds a table (facility_access)
    • Used to filter by putting it in the SQL where clause, but now done in the Superset slice parameter

Users and Roles

  • Roles
    • Admin - all
    • Alpha - power user
    • Gamma - regular user, no access to data sources
    • As default, we use modified version of Gamma (OLMIS_Gamma), gave it access to all data sources in db (only be able to view charts built off those data sources)
  • Out of the box, Superset does not restrict which dashboards are viewable, it restricts dashboards based on the data sources it uses
  • OpenLMIS users access through OpenLMIS report screen, but it looks like currently shows the top nav bar
  • When the user is added into OpenLMIS, they may not be able to access Superset reports for a week, because the refresh is currently happening every 7 days


Dashboards and charts building

  • Multiple visualization types available (over 40)
  • Filter box is also a chart type, associated with a data source, should filter off same data source as chart
  •  




OpenLMIS: the global initiative for powerful LMIS software