opensearch-project / opensearch-project/data-prepper

Custom code execution in processor or allowing mathematical operations in processor

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

Nobody has claimed this yet.

enhancement
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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.