|
1 | 1 | # Merge Resolver Rules
|
2 | 2 |
|
3 |
| -JMESPath identifier of the place where to insert the JSON object from |
4 |
| -_"ExtractionRules"_. If MergeResolverRules is null _"ExtractionRules"_ object |
5 |
| -will be inserted to the root of aggregated object. |
6 |
| - |
7 |
| -The location in the aggregated object where the extracted content will be merge |
8 |
| -can be specified with path elements and a value to exist at that, but not all |
9 |
| -elements of a path are needed. The aggregated object will be flattened and all |
10 |
| -paths that contains the path elements in the given order will be collected. |
11 |
| -Then we check the value and the path with the value is the winning path. If no |
12 |
| -value from the paths match the given value then we take the longest path that |
13 |
| -contains the given path elements. |
14 |
| - |
15 |
| -Example object: |
| 3 | +The **MergeResolverRules** is a JMESPath identifier which tells Eiffel |
| 4 | +Intelligence the place where to insert the JSON object extracted from |
| 5 | +**ExtractionRules**. If **MergeResolverRules** is null, the **ExtractionRules** |
| 6 | +object will be inserted to the root of aggregated object. |
| 7 | + |
| 8 | +## Specifying location with MergeResolverRules |
| 9 | +The location in the aggregated object where the extracted content will be |
| 10 | +merged, can be specified with path elements. The path element needs a |
| 11 | +value to exist, but not all elements of a path are needed. The aggregated |
| 12 | +object will be flattened and all paths that contains the path elements in |
| 13 | +the given order will be collected. Then we check the value, and the path |
| 14 | +which contains the value is the winning path. If no value from the paths |
| 15 | +match the given value then we take the longest path that contains the |
| 16 | +given path elements. |
| 17 | + |
| 18 | +If you want to place the extracted content into the root of the aggregated |
| 19 | +object you can choose to specify a location key which does not exist in |
| 20 | +the aggregated object, and there Eiffel Intelligence will not find this |
| 21 | +location. In our example rules we use the non-existing key and value |
| 22 | +**NONEPATH:NONE** to make Eiffel Intelligence place the content at the |
| 23 | +root of the object. |
| 24 | + |
| 25 | +Example aggregated object: |
16 | 26 |
|
17 | 27 | {
|
18 | 28 | "id":"eventId",
|
@@ -63,7 +73,8 @@ Example object:
|
63 | 73 |
|
64 | 74 | "MergeResolverRules" : "{level2:{event_id: %IdentifyRules%}}"
|
65 | 75 |
|
66 |
| -will result after replacing the marker by EI in rule: |
| 76 | +This rule will be interpreted by Eiffel Intelligence which replaces the |
| 77 | +marker %IdentifyRules% with a processed value, resulting in the following rule: |
67 | 78 |
|
68 | 79 | {level2:{event_id: someLevelId}}
|
69 | 80 |
|
|
0 commit comments