parse_ion
The parse_ion processor parses Amazon Ion data.
Configuration
You can configure the parse_ion processor with the following options.
| Option | Required | Type | Description | 
|---|---|---|---|
| source | No | String | The field in the eventthat is parsed. Default value ismessage. | 
| destination | No | String | The destination field of the parsed JSON. Defaults to the root of the event. Cannot be"",/, or any white-space-onlystringbecause these are not valideventfields. | 
| pointer | No | String | A JSON pointer to the field to be parsed. There is no pointerby default, meaning that the entiresourceis parsed. Thepointercan access JSON array indexes as well. If the JSON pointer is invalid, then the entiresourcedata is parsed into the outgoingevent. If the key that is pointed to already exists in theeventand thedestinationis the root, then the pointer uses the entire path of the key. | 
| parse_when | No | String | Specifies under which conditions the processor should perform parsing. Default is no condition. Accepts a Data Prepper expression string following the Expression syntax. | 
| overwrite_if_destination_exists | No | Boolean | Overwrites the destination if set to true. Set tofalseto prevent changing a destination value that exists. Defaults istrue. | 
| delete_source | No | Boolean | If set to true, then the source field is deleted. Defaults isfalse. | 
| tags_on_failure | No | String | A list of strings specifying the tags to be set in the event that the processor fails or an unknown exception occurs during parsing. | 
Usage
The following examples show how to use the parse_ion processor in your pipeline.
Example: Minimum configuration
The following example shows the minimum configuration for the parse_ion processor:
parse-json-pipeline:
  source:
    stdin:
  processor:
    - parse_json:
        source: "my_ion"
  sink:
    - stdout:
When the input event contains the following data:
{"my_ion": "{ion_value1: \"hello\", ion_value2: \"world\"}"}
The processor parses the event into the following output:
{"ion_value1": "hello", "ion_value2" : "world"}