R12.1-2025Jul03

Define a Table Parser

The Table Parser parses table-formatted text, such as NDP tables, VRF tables, OSPF neighbors, and more. With the Table Parser, you can address the line of table headers in the raw text and then use the column separator to manually adjust the table columns.

Applicable Parser Rules for Table Parser

When to Use a Table Parser

A Table Parser transforms the table-style text into a table data structure.

Define a Table Parser to Parse the Route Summary Table

Take the parsing of the IP Route Summary table as an example. You can define a Table Parser to parse the IP Route basic information.

  1. Create a new parser, then define the basic parser name (hover over the parser name and click the  icon, then name the parser "IP Route Summary") and the definitions for collecting CLI command data.
    In this example, you retrieve CLI command data for the command show ip route summary from the device US-NYC-R1.

  2. Click the Retrieve button to retrieve the sample data. For more information on retrieving command data sources, see Data Source for Retrieving Data in Parser.

  3. Select lines 4-8 from the sample text, and you will see the Parser Table button in a floating tip window.

  4. Click Parse Table to create a table pattern. The selected original lines are parsed automatically. The system fills in the Table Header Line and Set Table Column fields based on the parsed lines. The result is displayed in the Output area.

    Information Tip: You can also select the Table option from the pattern type menu to create a table pattern first, then retrieve lines of original texts to fill out data in the table pattern. 
  5. In the Table Header field, the column headers are automatically separated. You can click the  icon to divide table headers by adding a semicolon (;) to separate every two column names.

  6. In the Set Table Column block, select variables required to parse, rename the column and select the variable types. 
    For example, you can change the variable type of Memory (bytes) from "string" to "int".

    Information Tip: In the Set Table Column block, you can click the  icon to remove an unnecessary table column. 
  7. In the Advanced Settings section, define more settings to make refinements. 
    For example, select the Exclude Lines options, then enter "intra" and "NSSA" to exclude lines 9-10 from the scope of texts to be parsed.  

     
  8. Click Apply to confirm the settings for this table pattern. 
  9. Preview the parsed result of the sample text and click the save icon  to save the Table Parser.