You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some processors we only want to run when the field has a certain type.
Proposal
I propose creating a new operator within the Data Prepper expression language: typeof.
This could be used to determine if a given field has a certain type.
For example:
/myfield typeof string
Additionally, this approach could support inheritance.
For example, the following could be true:
25 typeof integer
25 typeof number
25.5 typeof double
25.5 typeof number
Types
Data Prepper doesn't have have a consistent concept of types. However, we should have some core types. We can base these on what we already have for the convert entries processor.
…itially created to help connect the convert_entry_type processor with upcoming work for evaluating type information as part of opensearch-project#4478.
Signed-off-by: David Venable <[email protected]>
Adds an enum to represent core data types in Data Prepper. This is initially created to help connect the convert_entry_type processor with upcoming work for evaluating type information as part of #4478.
Signed-off-by: David Venable <[email protected]>
Background
Some processors we only want to run when the field has a certain type.
Proposal
I propose creating a new operator within the Data Prepper expression language:
typeof
.This could be used to determine if a given field has a certain type.
For example:
Additionally, this approach could support inheritance.
For example, the following could be true:
Types
Data Prepper doesn't have have a consistent concept of types. However, we should have some core types. We can base these on what we already have for the convert entries processor.
data-prepper/data-prepper-plugins/mutate-event-processors/src/main/java/org/opensearch/dataprepper/plugins/processor/mutateevent/TargetType.java
Lines 21 to 25 in 24bbbf1
Alternative
One alternative is to add a new function.
However, this would not work so well with inheritance.
The text was updated successfully, but these errors were encountered: