Tracing Final Parsing Results

The Open Parser Trace Details feature displays a graphical view of how the input field was parsed, token-by-token, into the output field values. Trace displays matching results, non-matching results, and interim results.

Final Parsing Results shows the parsing grammar tree and the resulting output. Use this view when you want to see only the results of the matching process. This is the default view.

  1. In Enterprise Designer, open the dataflow that contains the Open Parser stage whose parsing results you want to trace.
  2. Double-click the Open Parser stage on the canvas.
  3. Click the Preview tab.
  4. Enter sample data that you want to parse then click the Preview button.
  5. In the Trace column, click the Click here... link to display the trace diagram.

    The tree view of the parsing grammar shows one or more the following elements, depending on the selected options:

    • The <root> variable. The top node in the tree is the <root> variable.
    • The expressions defined in the <root> variable. The second-level nodes are the expressions defined in the <root> variable. The <root> expressions also define the names of the output fields.
    • The variable definitions of the second-level nodes. The third-level nodes and each level below it are the definitions of each of the <root> expressions. Expression definitions can be other variables, aliases, or rule definitions.
    • The values and tokens that are output. The bottom node in the tree shows the values assigned to each sequential token in the parsing grammar.
    • The parser score for relevant elements of the parsing grammar. Parser scores are determined from the bottom of a root expression to the top. For example, if an expression pattern has a weight of 80 and an ancestor rule has a weight of 75, the final score for the ancestor expression is the product of the child scores and the ancestor scores, which in this example would be 60 percent.
    • The space character displays in the Input data text box as a non-breaking space character (upward facing bracket) so that you can better see space characters. Delimiters not used as tokens are displayed as gray.
  6. In the Information field, select Final parsing results.
    Note: To step through the parsing events, see Stepping Through Parsing Events.
  7. In the Level of detail list, select one of the options.
    • Hide expressions without results. Shows those branches that lead to a matching or non-matching result. Any root expression branch that does not lead to a match is shown as an ellipsis. If you want to look at a branch that does not lead to a match, double-click on the ellipsis.
    • Hide root expressions without results. Shows all branches of the root expressions containing match or non-matching results. Any other root expressions are not displayed.
    • Show all roots. Shows every root expression. If a root has no matching result, the display is collapsed for that root expression using the ellipsis symbol.
    • Show all expressions. Shows the root expressions and all branches. The root expressions are no longer displayed as an ellipsis; instead, the rules for each expression in the branch are shown.

    If you have a level-of-detail view selected that hides expressions without results and you select a root expression that is not currently displayed, Trace Details changes the level-of-detail selection to a list item that shows the minimum number of root expressions, while still displaying the root expression.

  8. Click Show scores to display parser scores for root expressions, variable expressions, and the resulting matches and non-matches.
  9. In the Zoom field, select the size of the tree view.
  10. In the Root clause field, select one of the options to show that branch of the root expression tree.

    When you click an expression branch in the trace diagram, the Root clause list updates to display the selected clause. Double-click an ellipsis to display a collapsed expression.

  11. Click OK when you are done. The level of detail, show scores, and zoom control settings are saved when you click OK.