Merge Methods
The merge_method setting controls how the transformed output is combined with the original input.
overwrite
Transformed fields replace input fields with the same key. Input fields not mentioned in transforms are preserved.
- Input
- Output
- Transforms
{ "x": 1, "y": 2 }
{ "x": 11, "y": 2 }
[
{ "x": "input.x + 10" }
]
preserve
The original input is returned unchanged, and transformed fields are placed under a transforms key.
- Input
- Output
- Transforms
{ "x": 1, "y": 2 }
{
"x": 1,
"y": 2,
"transforms": { "x": 11 }
}
[
{ "x": "input.x + 10" }
]
transforms_only
Only the transformed fields are returned. All original input fields are discarded.
- Input
- Output
- Transforms
{ "x": 1, "y": 2 }
{ "x": 11 }
[
{ "x": "input.x + 10" }
]
When to use transforms_only
This mode is particularly useful inside sub-transformations and nested transforms, where you want to extract or reshape only specific fields from a sub-object.