-
Hi everyone, I have been searching in google and in the issues section but with no luck. i tried this #1868 but with no luck. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey, thanks for reaching out. We still haven't done any documentation on smart filters but we're planning to (#1865). Right now, you can refer to this: variables bind to groovy context: partition, timestampMs, keyAsText, valueAsText, header, key (json if possible), value (json if possible) json parsing logic: sample scripts:
|
Beta Was this translation helpful? Give feedback.
Hey, thanks for reaching out.
We still haven't done any documentation on smart filters but we're planning to (#1865).
Right now, you can refer to this:
variables bind to groovy context: partition, timestampMs, keyAsText, valueAsText, header, key (json if possible), value (json if possible)
json parsing logic:
for key and value if they can be parsed to json they bound as json objects, if not - bound as null
sample scripts:
keyAsText != null && keyAsText ~"([Gg])roovy"
- regex on key as a stringvalue.name == 'iliax' && value.age > 30
- when value is jsonvalue == null && valueAsText != null
- search for values that are not null and are not jsonheaders.sentBy == 'some system' && headers[…