Monday, March 30, 2015

#388 Stream Explorer --> Patterns - Eliminate Duplicates and Missing Event Patterns.


According to the ORCL docs -

A pattern provides you with a simple way to explore event streams based on common business scenarios.

A pattern is a template of an Oracle Event Processing application that already has the business logic built into it. The visual representation of the event stream varies from one pattern type to another based on the key fields you choose.

So which patterns are provided?

The names are essentially self-explanatory, but, if required, you can find in-depth descriptions in the
users guide here

I'll content myself with giving you some examples here.

Eliminate Duplicates Pattern

I have a file that contains lots of credit card transactions, many of them duplicates.

Now my key here is CreditCardNr, MerchantNr and TransactionValue. In my particular scenario,
that has to be unique.

I create a Stream based on a CSV file.

Note: I do not create an Exploration.

Now create the Pattern, Eliminate Duplicates -
Specify the Stream.
Specify the key.

Here is a closeup of the settings -

Play around with the Time Window settings to see how it affects the output.

Test File is available here

Missing Event Pattern

Here I have a simple sensor heartbeat scenario -

 I then create the Pattern Missing Event based on this stream.

Here are my results -


To recap, my input file is as follows -

Further on down the file, we are missing some heartbeats from sensor 7.

I've also added some rogue sensors (10 and 11) -

Just a note on the Exploration name - It has defaulted to Exploration3.

Looks better now -

Test input file available here

No comments: