opensearch-project / data-prepper

OpenSearch Data Prepper is a component of the OpenSearch project that accepts, filters, transforms, enriches, and routes data at scale.
https://opensearch.org/docs/latest/clients/data-prepper/index/
Apache License 2.0
263 stars 197 forks source link

Support Painless scripts as a processor #5073

Open dlvenable opened 2 weeks ago

dlvenable commented 2 weeks ago

Is your feature request related to a problem? Please describe.

OpenSearch users are often familiar with Painless script. Also, many users are looking for generic scripting as well.

Describe the solution you'd like

Create a painless processor:

processor:
- painless:
     source |
       event['total_time'] = event['connection_time'] + event['response_time']

Describe alternatives you've considered (Optional)

This could also exist alongside an expression script using existing Data Prepper expression languages.

Additional context

N/A

AdaptiveStep commented 2 weeks ago

Cool idea. But why settle with painless. Why not just offer LUA scripting in general? Seems like an easier solution.