Skip to content
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

[BUG] Data Prepper strings do not support $ #4772

Open
dlvenable opened this issue Jul 30, 2024 · 0 comments
Open

[BUG] Data Prepper strings do not support $ #4772

dlvenable opened this issue Jul 30, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dlvenable
Copy link
Member

Describe the bug

Strings in Data Prepper do not allow a $ character. This can be problematic for any situation, but especially when using a regex pattern to get the end of a line.

To Reproduce

Create a pipeline with a route like:

/some_field =~ "^prefix-[a-zA-Z0-9-]+$"

Run Data Prepper.

You will get some cryptic errors.

Caused by: org.opensearch.dataprepper.expression.ExceptionOverview: Multiple exceptions (37)
|-- org.antlr.v4.runtime.LexerNoViableAltException: null
    at org.antlr.v4.runtime.atn.LexerATNSimulator.failOrAccept(LexerATNSimulator.java:309)
|-- org.antlr.v4.runtime.InputMismatchException: null
    at org.antlr.v4.runtime.DefaultErrorStrategy.sync(DefaultErrorStrategy.java:270)

Change the regex by removing the $. The route works as expected.

Expected behavior

I should be able to run Data Prepper with $ in the strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant