What is Reporting plugin?
Reporting plugin will help you to build and bootstrap custom reports built on generic information about usage and processes using reporting plugin. Multiple reports to meet various needs can be generated. The plugin uses Superset as a data exploration and visualization tool.
The plugin runs in a Docker container with the official Superset image.»Superset Docker
Below you can find the architecture of the reporting plugin.
What is Superset?
Apache Superset is an open-source software application for data exploration and data visualization able to handle data at a large scale. It enables users to connect their company's databases and perform data analysis, and easily build charts and assemble dashboards.
Superset is also an SQL IDE, so users can write SQL, join data create datasets and so on.»Superset documentation
The Data tab represents the sources of all information:
- CSV files
- Excel files
Reporting plugin can be used with Superset by connecting it with a PostgreSQL DB.
Charts represent the output of the information. There are multiple visualization charts/ plugins available.
With the use of dashboards, you can share persuading flows, show how metrics change in various scenarios and match your company efforts with logical, evidence‐based visual indicators.
Contains all the information for extracting and processing data from the DB, including SQL queries, calculated metrics information, cache settings, etc. Datasets can also be exported / imported.
Connecting to a database
It is mandatory that before using Superset, the reporting plugin need to have a PostgreSQL database installed and configured.»FLOWX.AI Engine DB configuration»Reporting DB configuration
Read-only users should be used in production in the reporting-plugin cronjob.
Connecting Superset to a DB
To connect Superset to a database, follow the next steps:
- From the Toolbar, hover your cursor over the "+" icon, then select Data, and then select Connect Database.
- The Connect a database window appears. Select the appropriate database card (in this case - PostgreSQL).
- After you selected the DB, click Connect this database with a SQLAlchemy URI string instead?.
- Fill in the SQLALCHEMY URI and then click Connect.
SQLAlchemy URI represents the URI of reporting-db. The format would look like this:
Using reporting plugin
Before using the plugin, make sure you marked all the Data models and Processes you want to include, so they can be further used in the reporting.
Use in reporting flag
This flag can be used in the following places:
- Data model - for the keys that must be used in the reporting
- Process settings tab - to include a process definition in reporting.
Now you can use Superset to manipulate the data and create any kind of visuals and dashboards.
Creating a Chart
There are multiple ways in which you can create/configure a chart.
Creating charts using Datasets tab
To create a Chart using the first method, you must follow the next steps:
- From the top toolbar, select Data option tab, then click Datasets.
You need to have a dataset added to Superset first. From that particular dataset you can build a visualization.
- Select the dataset you want to work with.
- After selection, the explore page appears.
- When you select a dataset, by default table visualization type is selected.
To view all the existent visualization types, click View all charts, the charts' gallery will open.
- Select the visualization type and click Create chart.
Creating charts using Chart gallery
Using Chart gallery is a useful method when you are not quite sure about which char will be best for you.
To create a Chart using the second method, you must follow the next steps:
- From the top toolbar, select "+" icon, then select Chart.
- The Create a new chart screen appears.
- Choose the dataset that you want to use.
- The next step is to choose a chart type.
If you wish to explore all the chart types available, filter by All charts. The charts are also grouped by categories.
- When you select a chart, at the bottom of the screen you will notice a description of the chart and also example graphics.
- When you are done with your selection, click Create new chart.
Configuring a Chart
After creating a chart, there are some Query fields that muse be configured. This can be easily done by dragging and dropping the relevant columns to the matching fields.
Time and Query form attributes are different, depending on the chart type that you select.
Exporting/importing a Chart
You can export and import charts to help you analyze your data and manipulate dashboards. To export/import a chart, follow the next steps:
- Open Superset and from the top navigation bar, select Charts.
- From the newly opened list, select your chart.
- In the top-right corner, select the breadcrumbs menu.
- Now click Download, three options are available:
- Export to .CSV
- Export to .JSON
- Download as image
- Time - time related form attributes
- Query - query attributes
- Dimensions - one or many columns to group by
- Metrics - metrics to display
- Percentage metrics - metrics for which percentage of total are to be displayed, calculated from only data within the row limit
- Filters - metric used for filtering
- Sort by - metric used to define how the top series are sorted if a series or row limit is present
- Row limit - limits the number of rows that get displayed
Creating a slice and a dashboard
To create a dashboard, while creating a Chart you can choose to add it to a new dashboard. A dashboard will be created automatically.
To create a dashboard follow the next steps:
- Let's create a new chart called City of birth (see the steps above).
- Now save the newly created chart to a new dashboard called Cities.
- To publish, click Save and go to Dashboard.
»Reporting setup guide