Skip to content

[BUG] Escaping of "/" in json pointers #5101

@Conklin-Spencer-bah

Description

@Conklin-Spencer-bah

Describe the bug

In my pipeline.yaml i am hoping to extract the value "foo" however in the field the key there are "/" slashes and it should be treated as one key. As seen below.

{ "kubernetes": { "labels": { "app.kubernetes.io/component": "foo" } } }

Data Prepper uses "/" for json pointers. So it would look like so:
'/kubernetes/labels/app.kubernetes.io/component'

However this does not capture the value thus it is skipped. I think it is because the "/" in component needs to be escaped. How do you escape values in Data Prepper?

To Reproduce

  1. Publish an event like the one structured above.
  2. Attempt to parse out the event value "foo" and store it into another field.

Expected behavior
I was expecting to be able to escape the "/" with a "/" or of the escape patterns specified in the documentation. However this did not work.

Environment (please complete the following information):

  • OS: MacOSX

Additional context
AWS Managed OpenSearch Ingestion Service

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions