opensearch-project / opensearch-project/data-prepper

[BUG] Use Json Pointer syntax on copy_values processor "from_key"

Open
#2,416 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
374
Forks
354
Avg merge
3d 18h
Merged PRs (30d)
8

Description

Describe the bug
Trying to copy the value from a key with a "/" on the name

To Reproduce
Steps to reproduce the behavior:
Use the following processor with docker image 2.1.1:

processor:
  - copy_values:
      entries:
      - from_key: "/kubernetes/labels/app/kubernetes/io~1name"
        to_key: "app_name"
        overwrite_if_to_key_exists: true

Expected behavior
I would expect the "~1" to be replaced with "/" as described on the expression documentations

Screenshots
java.lang.IllegalArgumentException: key /kubernetes/labels/app/kubernetes/io~1name must contain only alphanumeric chars with .-_ and must follow JsonPointer (ie. 'field/to/key')

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the configuration with Docker image 2.1.1 and trace the copy_values processor's handling of from_key as a Json Pointer. Confirm the expected behavior for the escaped segment io~1name; done means the value is copied to app_name without the reported IllegalArgumentException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
data-engineering
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.