-
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.
Answered by
Haarolean
May 6, 2022
Replies: 1 comment
-
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.
0 replies
Answer selected by
Haarolean
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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[…