Edge Delta Extract JSON Field Node

Extract JSON from the body field.

Overview

The Extract JSON Field node extracts a field’s value and replaces the whole JSON log content with only the field’s value. To do this it gets raw bytes of a log item and tries to parse it as a JSON document. It finds specific JSON paths in the JSON document and it creates a copy of the incoming log item, per each matching JSON path, with each generated log item’s raw bytes being each captured value.

Example Configuration

nodes:
  - name: extract_all_data
    type: extract_json_field
    field_path: "records.[*]"

Required Parameters

name

A descriptive name for the node. This is the name that will appear in Visual Pipelines and you can reference this node in the yaml using the name. It must be unique across all nodes. It is a yaml list element so it begins with a - and a space followed by the string. It is a required parameter for all nodes.

nodes:
  - name: <node name>
    type: <node type>

type: extract_json_field

The type parameter specifies the type of node being configured. It is specified as a string from a closed list of node types. It is a required parameter.

nodes:
  - name: <node name>
    type: <node type>

field_path

The field_path parameter is a dot separated path of the field. It captures the JSON path from each log item. It supports for wildcards * which is useful for capturing all values in an array. It is specified as a string and is required.

nodes:
  - name: <node name>
    type: extract_json_field
    field_path: "records.[*]"

Optional Parameters

keep_log_if_failed

The keep_log_if_failed parameter defines whether to drop items with processor failures such as improper JSON documents or non-existing JSON paths. It is specified as a Boolean and the default is false, indicating that failures will be dropped. It is optional.

nodes:
  - name: <node name>
    type: extract_json_field
    field_path: "records.[*]"
    keep_log_if_failed: true