mardi 10 août 2021

How can I set the continuity between patterns in Flink CEP SQL?

We know that in Flink CEP Java, APIs such as next(), followedBy() and consecutive() can be used to set the continuity between different patterns. However, in CEP SQL, because the syntax is relatively simple, it is difficult to clearly describe the continuity between patterns.

My question is, if the defined patterns are PATTERN(a b+ c), are all events matching patterns a, b and c strictly continuous? I mean, is PATTERN(a b+ c) in CEP SQL equivalent to a.next(b).oneOrMore().consecutive().next(c) in CEP Java?

For example, for PATTERN(a b+ c), if the input event stream is {abbbc axbxbc}, I want to output only {abbbc}, because {axbxbc} contains mismatched event x, which needs to be excluded.

Aucun commentaire:

Enregistrer un commentaire