R12.1-JA-2025June05
Aggregate Table

Aggregate Table is a pattern that can merge table rows of an output table by a column key and remove some columns from the parser output.

For an Aggregate Table pattern, define the following:

  1. Select source table: One parser can have several output tables. The first step of defining aggregate table is to select one output table to operate on.
  2. Aggregate by: Select one or more source table columns as the key for aggregating table data. Each unique entries in these columns will be the references for table aggregation.
  3. Select columns: Selected columns that will be aggregated. All the columns of the source table will be selected by default, and users can remove a column by unchecking the checkbox.
  4. Select a method to aggregate data. Different methods for merging table contents are provided depending on the column type.

The following table describes the meaning of each method.

Column typeMethodDescription

String/Mstring Type Column

 

 

Merge by LineThe columns will be merged by the line number. For rows corresponding to the same line number in the sample command line text, only one line will be reserved.
Merge by ConnectorThe cell contents in these columns will be connected by a selected connector to be placed into one cell. if there is a redundant variable after merging the columns, the merged variable will lack location info (the line number in config line text).
FirstThe contents in the first cell of this column will be reserved to form only one row.
Int/Float Type Column FirstOnly the integer value in the first cell of this column will be reserved to form only one row.
Bool Type ColumnFirstOnly the value in the first cell of this column will be reserved to form only one row.

Example of How to Aggregate Output Table Data

The following output table needs to be simplified by merging some rows and remove some redundant columns.

To achieve this goal, create the following Aggregate Table pattern:

  1. Click +New Pattern > Advanced > Aggregate Table to create an empty aggregate table pattern. 

  2. In the Source Table field, click the icon, then select the output table access_group as the source table to operate on. 

  3. In the Aggregate by field, click the  icon, then select columns from the source table, then the values in these columns will be taken as reference when table is aggregated. 

  4. Click +Add Column to add columns to aggregate to the source table, then select the method of aggregate each column. By default, all columns of the source table will be listed here, you can click the  icon to remove unnecessary columns.  
    • Select the $INTF_Name column and the First method. 
    • Select the $addVar1 column and the Merge by Line method.  
  5. View the aggregated final output table as shown below, then click the  icon to save the parser.