File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed
_data-prepper/pipelines/configuration/processors Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff 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+
You can’t perform that action at this time.
0 commit comments