...
From the existing list of SMTs, there are the following to be impacted by this change:
New configuration flags
Name | Type | Default | Importance | Documentation |
---|
transforms.<name>.field.style | STRING | plain | HIGH
| Permitted values: plain , nested . Defines how to traverse a record structure to apply a transformation. If set to " |
rootplain ", then the transformations will only apply to the elements located at the root of the message. If set to "nested", then nested elements (accessed by "field.separator") will be affected by the transformations as well.
|
transforms.<name>.field.separator | STRING | . | LOW | Permitted values: "." (dot), "/" (slash) . When defining the path to a field, this separator determines this path is divided into parent and child elements. If set to ".", then a path "parent.complex.element" will access the parent " |
rootparent" struct/map, then the "complex" struct/map, to apply the transformation to the "element". If the default value collides with the element names used in the record, then it can be changed to one of the other 3 alternative values. |
Example:
Code Block |
---|
{
"transforms": "cast",
"transforms.cast.field.style": "nested",
"transforms.cast.type": "..."
"transforms.cast.spec": "address.personal:string",
} |
SMTs affected
Extending the support for field configuration for dotted separation:
...
...
Using double dots to escape separators is another alternative to try sticking to using only dots as a field separator.
Comparing:
With double dots | With separator |
---|
|
.field.stylenested "transforms.cast.field.style": " |
|
cast "transforms.cast.type": "..."
"transforms.cast.spec": "address..personal.country:string"
} |
| |
.field.stylenested separator/
"transforms.cast.field.separator": " |
|
cast/",
"transforms.cast.type": "..."
"transforms.cast.spec": "address.personal/country:string",
} |
|
Even though changing the separator represents yet another property to configure, it will be used in a minority of cases, and it could be easier to understand compared to escaping by repeating dots.
...