How do I reformat existing dataviews and group multiple rows of data together?

Users can make use of the Gateway-SQL plugin, which provides a way to summarise and reformat dataviews on the same gateway. The plugin has been available since gateway version GA3.0.15 (GWX-1949). This article provides an example with the group_concat() function.

We have picked the Gateway-Managed Entities Data plugin as an example for the source data.

We are interested in rows that are reported as Warning or Critical severity. In this example, there are 2 in Warning severity and 1 in Critical severity as highlighted above.

We will create a new dataview using the Gateway-SQL plugin. At the Tables option, it takes the XPath of the original dataview like a database table. We only need to define 1 table here and we use T1 as the table name.

At the Views option, it accepts SQL syntax to manipulate data from the source. The GROUP BY clause is used to combine the data based on severity. The group_concat() function merges the ME names to a single row, and we use ', ' as separator.