Skip to content

Copy

Copy (copy)

Copy fields of an event using JSONPATH expressions.

Transform json

Minimal example

actions:
- copy:
jsonpath-fields: {}
JSON
{
"actions": [
{
"copy": {
"jsonpath-fields": {}
}
}
]
}

Contents

Fields

FieldTypeRequiredDescription
jsonpath-fields Mappingmap (string)Fields to add to the event, where the values are the result of a JSONPath query For the query syntax see: https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-12.html.
description Generalstringdescribe this step.
condition Generallua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
overwrite Mappingboolean (bool)Override existing fields.

General

Show fields
FieldTypeRequiredDescription
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()

Mapping

Show fields
FieldTypeRequiredDescription
jsonpath-fieldsmap (string)Fields to add to the event, where the values are the result of a JSONPath query For the query syntax see: https://www.ietf.org/archive/id/draft-ietf-jsonpath-base-12.html.
overwriteboolean (bool)Override existing fields.

Schema

Jsonpath Fields Table

Output fieldSelector
user_id$.user.id

Key format: field. Value format: jsonpath.

JSONPath query that selects a single value. Dot-path (a.b.0) and JSON Pointer (/a/b/0) are accepted as convenience and converted to JSONPath.