mirror of
https://github.com/iSharkFly-Docs/opensearch-docs-cn
synced 2025-02-10 23:34:41 +00:00
* Add DLQ and aggregate processor edits. Baseline processor names Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Remove processor from titles Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Update dlq.md Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Add additional feedback Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * add cross links Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Fix typos Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Add doc review Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Remove link Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Update dlq.md Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> * Fix processor title Signed-off-by: Naarcha-AWS <naarcha@amazon.com> * Apply suggestions from code review Co-authored-by: Nathan Bower <nbower@amazon.com> Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> --------- Signed-off-by: Naarcha-AWS <naarcha@amazon.com> Signed-off-by: Naarcha-AWS <97990722+Naarcha-AWS@users.noreply.github.com> Co-authored-by: kolchfa-aws <105444904+kolchfa-aws@users.noreply.github.com> Co-authored-by: Nathan Bower <nbower@amazon.com>
1.6 KiB
1.6 KiB
layout | title | parent | grand_parent | nav_order |
---|---|---|---|---|
default | add_entries | Processors | Pipelines | 40 |
add_entries
The add_entries
processor adds entries to an event.
Configuration
You can configure the add_entries
processor with the following options.
Option | Required | Description |
---|---|---|
entries |
Yes | A list of entries to add to an event. |
key |
Yes | The key of the new entry to be added. Some examples of keys include my_key , myKey , and object/sub_Key . |
value |
Yes | The value of the new entry to be added. You can use the following data types: strings, Booleans, numbers, null, nested objects, and arrays. |
overwrite_if_key_exists |
No | When set to true , the existing value is overwritten if key already exists in the event. The default value is false . |
Usage
To get started, create the following pipeline.yaml
file:
pipeline:
source:
...
....
processor:
- add_entries:
entries:
- key: "newMessage"
value: 3
overwrite_if_key_exists: true
sink:
{% include copy.html %}
For example, when your source contains the following event record:
{"message": "hello"}
And then you run the add_entries
processor using the example pipeline, it adds a new entry, {"newMessage": 3}
, to the existing event, {"message": "hello"}
, so that the new event contains two entries in the final output:
{"message": "hello", "newMessage": 3}
If
newMessage
already exists, its existing value is overwritten with a value of3
.