Parser

Description

Parser is used for filling the field mapping table with detected data or from a predefined list.

  • If a null string or binary value is detected, a single tuple is returned with a null value.

  • If an empty input string value is detected, a single tuple is returned with a null value.

  • The parser set on CSV or JSON can flatten a parsed input into multiple tuples.

Use

  • Select the input field. (String or binary)
  • Mark the radio button for how to handle errors.
    • Do default Flow failure handling.
    • Handle failures in this node.
      • Enter a field name for the Failure and Success fields. 
        • The Hero Platform_ error message is displayed for tuples with an error in processing.
        • A Boolean value is displayed under the Success field. The value true of the parse was successful and false if an error occurred.
  • Select the parser type and fill the parser's configuration. (See Work with Parsers)
  • Click the refresh icon by the field mapping table to review the detected field names.

  • Click OK.


Example

Example JSON
{
   "Product": {
    "Bikes":[
       {
            "Brand":"Dolan",
            "Color":"White"
         },
         {
            "Brand":"Fuji",
            "Color":"Red"
         },
         {
            "Brand":"Look",
            "Color":"Black"
         }
      ]
   }
}

Parsing a JSON using the default root path:

Parsing a JSON defining the root path:

Type

Flatten