-
Notifications
You must be signed in to change notification settings - Fork 214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flatten processor: option for keys wihout brackets #4616
Comments
This is a reasonable ask and should be a small change. |
There is a use case (#3965) to keep the brackets after removing list indices, so we want to retain that option. We can add an option for removing the indices along with the brackets. Either through:
or just:
|
Sure, I will try to make the changes.
What would be the behavior for using |
) (opensearch-project#4653) Signed-off-by: Timo Mueller <timo.mueller@tower.telekom-cloudcenter.de> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
) (opensearch-project#4653) Signed-off-by: Timo Mueller <timo.mueller@tower.telekom-cloudcenter.de> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
) (opensearch-project#4653) Signed-off-by: Timo Mueller <timo.mueller@tower.telekom-cloudcenter.de> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
) (opensearch-project#4653) Signed-off-by: Timo Mueller <timo.mueller@tower.telekom-cloudcenter.de> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
) (opensearch-project#4653) Signed-off-by: Timo Mueller <timo.mueller@tower.telekom-cloudcenter.de> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
) (opensearch-project#4653) Signed-off-by: Timo Mueller <timo.mueller@tower.telekom-cloudcenter.de> Signed-off-by: Krishna Kondaka <krishkdk@dev-dsk-krishkdk-2c-bd29c437.us-west-2.amazon.com>
Is your feature request related to a problem? Please describe.
Currently the flatten processor adds empty squared brackets to the keys of list elements, even when the
remove_list_indices
option is set totrue
. So something liketurns into
When the mentioned option is set to
false
the brackets are needed to reference list indices but in this case they could easily be ommited. It would be nice if the keys would keep their original names and the output would be this instead:Describe the solution you'd like
Either remove the brackets from keys when
remove_list_indices
is set totrue
, or add an option (original_key
orremove_brackets
) that has the same effect when used together withremove_list_indices
set totrue
.Additional context
For some automated processes (e.g. creating mappings via index templates before writing documents) it could be valuable to retain the original key names.
The text was updated successfully, but these errors were encountered: