You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] rename_keys processor: json pointers with escaped syntax fail to validate #5121
2024-10-28T16:35:39,367 [main] ERROR org.opensearch.dataprepper.core.validation.LoggingPluginErrorsHandler - 1. rp-pipeline-file.processor.rename_keys: caused by: Parameter "entries.null.to_key" for plugin "rename_keys" is invalid: key "cs(host)" must contain only alphanumeric chars with .-_@/ and must follow JsonPointer (ie. 'field/to/key')
Expected behavior
The to_key argument "cs(host)" should be accepted as it conforms to the documented syntax.
Screenshots
N/A
Environment (please complete the following information):
Perhaps we can make use of escape sequences to allow parenthesis. Right now, our validation just looks for the characters themselves. But, we do not allow them to be escaped.
@dlvenable yes, I am trying to produce field names compatible with w3c's extended log file format, that uses the format prefix(header) to designate headers sent in the request or the response. For instance, cs(user-agent) is the field for the user-agent header sent in the request.
Activity
dlvenable commentedon Oct 29, 2024
@joelmarty , Do you want to produce key names with parenthesis in them?
dlvenable commentedon Oct 29, 2024
Perhaps we can make use of escape sequences to allow parenthesis. Right now, our validation just looks for the characters themselves. But, we do not allow them to be escaped.
We have some related work in #5111.
joelmarty commentedon Oct 30, 2024
@dlvenable yes, I am trying to produce field names compatible with w3c's extended log file format, that uses the format
prefix(header)to designate headers sent in the request or the response. For instance,cs(user-agent)is the field for the user-agent header sent in the request.dlvenable commentedon Mar 11, 2025
@joelmarty , I don't think we are working this, but if you'd like to work this, we can help with guiding you on what to change.
Utkarsh-Aga commentedon Jul 9, 2025
Hello @dlvenable
If no one is working on this yet, I can work on this.
dlvenable commentedon Jul 16, 2025
This does work in OpenSearch, so we should support this natively in Data Prepper:
results in:
dlvenable commentedon Jul 16, 2025
@Utkarsh-Aga , if you can work this, that would be great.
We need to include parenthesis here:
data-prepper/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/event/JacksonEventKey.java
Lines 172 to 183 in 48d5135
and here:
data-prepper/data-prepper-api/src/main/java/org/opensearch/dataprepper/model/event/JacksonEventKey.java
Lines 30 to 31 in 48d5135
We would definitely want some unit tests as well.
Utkarsh-Aga commentedon Jul 17, 2025
Okay Sure, Would work on it.
Thank you
dlvenable commentedon Apr 21, 2026
Resolved by #6233 .