Open
Description
Component(s)
pkg/ottl
Is your feature request related to a problem? Please describe.
It would be great to be able to join a slice of strings/values into a string with a delimiter. I haven't found an easy way to do it with existing converters. (the closest functionality is Concat function but it doesn't support iteration through slice of values)
example: some of the target/exporting systems/platforms may expect input parameter(s) arrive as a string attribute with values separated by delimiter (e.g. Datadog ddtags
)
Describe the solution you'd like
Join function should assemble a slice of values into a string with the provided delimiter.
.e.g. usage examples
join(attributes["array.attribute"])
(e.g. with default delimiter "," )join(attribute["array.attribute"], ";")
statement example:
- set(attributes["string.attribute"], join(attributes["array.attribute"], ";"))
Describe alternatives you've considered
No response
Additional context
No response