opensearch-project / opensearch-project/data-prepper
Custom code execution in processor or allowing mathematical operations in processor
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 374
- Forks
- 354
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 8
Description
Is your feature request related to a problem? Please describe.
It would be nice to allow mathematical operations in the processor. Sometimes we have to add new fields by summing up two fields in the input before pushing them into a destination.
Describe the solution you'd like
input: { a: 1, b: 2 }
output: { a: 1, b: 2, newField: 3}
In the above output "newField" should be created by adding fields "a" and "b". I,e newField = a+b
Describe alternatives you've considered (Optional)
logstash does allow users to run custom ruby code as part of filters which allows users to perform the above operations.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the processor implementation and its existing configuration or transformation behavior. Trace how input fields are mapped into output fields, then determine how mathematical expressions or custom code would be specified and evaluated. Done means a processor can create newField from a+b with documented behavior and coverage for the example input and output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100