-
Notifications
You must be signed in to change notification settings - Fork 273
Description
Describe the bug
The escaped syntax for json pointers define how to build json pointers for fields that include special characters.
However, the isValidKey() method in JacksonEventKey only checks the basic character set and keys defined with the escaped syntax are rejected.
To Reproduce
Steps to reproduce the behavior:
- Create a pipeline with a
rename_keysprocessor using an escaped syntax:
my-file-pipeline:
source:
file:
path: run/data/events.jsonl
record_type: event
format: json
sink:
- file:
path: "run/data/result.jsonl"
processor:
- rename_keys:
entries:
- from_key: host
to_key: '"cs(host)"'- Run data-prepper
- data-prepper cannot start with the error:
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):
- OS: macOs
- Version 14.5
Additional context
N/A
Metadata
Metadata
Assignees
Labels
Type
Projects
Status