Skip to content

Commit 0a456dd

Browse files
adding nested field description to select entries docs (opensearch-project#10336)
* adding nested field description to select entries docs Signed-off-by: Anton Rubin <[email protected]> * Update _data-prepper/pipelines/configuration/processors/select-entries.md Signed-off-by: Nathan Bower <[email protected]> --------- Signed-off-by: Anton Rubin <[email protected]> Signed-off-by: Nathan Bower <[email protected]> Co-authored-by: Nathan Bower <[email protected]>
1 parent 54d1f76 commit 0a456dd

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

_data-prepper/pipelines/configuration/processors/select-entries.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,41 @@ The `select_entries` processor includes only `key1` and `key2` in the processed
4949
```json
5050
{"key1": "value1", "key2": "value2"}
5151
```
52+
53+
### Accessing nested fields
54+
55+
Use `/` to access nested fields.
56+
57+
For example, when your source contains the following events with nested fields:
58+
59+
```
60+
{
61+
"field1": "abc",
62+
"field2": 123,
63+
"field3": {
64+
"name": "Alice",
65+
"surname": "Smith"
66+
},
67+
"field4": {
68+
"address": "123 Main St"
69+
}
70+
}
71+
```
72+
73+
You can use the following syntax to select a subset of fields:
74+
75+
```
76+
pipeline:
77+
source:
78+
...
79+
....
80+
processor:
81+
- select_entries:
82+
include_keys:
83+
- field1
84+
- field2
85+
- field3/name
86+
select_when: '/field3/surname == "Smith"'
87+
sink:
88+
```
89+

0 commit comments

Comments
 (0)