Patterns are much simpler than standard explorations. When working from a pattern, you need to specify a few key fields to discover an interesting result. Once you have created a pattern, it will appear in the Catalog just like any other exploration. You can use the patterns to create new explorations.
A pattern is a template of an Oracle Stream Analytics 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. A pattern provides you with a simple way to explore event Streams based on common business scenarios. Use the filters at left to view different categories of pattern and then click on Use this pattern to create an exploration. You can see full descriptions and learn more about each pattern by clicking the box that contains it. Click again to hide the extra information.
A pattern provides you with the results displayed in a live output stream based on common business scenarios.
Note:
While entering data in the fields for a specific pattern, ensure that the data you enter corresponds to the datatype of the field. If there is a mismatch between the entered data and the datatype, the pattern yields incorrect results.You can include or exclude patterns based on their categories using the View All link in the left panel under Show Me. When you click View All, a tick mark appears beside it and all the patterns are displayed in the page.
When you want to display/view only a few/selective patterns, unselect View All and select the individual patterns. Only the selected patterns will be shown in the catalog.
The following table categorizes the patterns.
Table 7-1 Categories of Patterns
Category | Pattern | New/Existing |
---|---|---|
General |
Change Detector |
New |
‘A’ Followed by ‘B’ |
New |
|
‘A’ Not Followed by ‘B’ |
New |
|
Bottom N |
Existing |
|
Detect Duplicates |
Existing |
|
Down Trend |
Existing |
|
Eliminate Duplicates |
Existing |
|
Fluctuation |
Existing |
|
Inverse W |
Existing |
|
Detect Missing Heartbeat |
New |
|
Top N |
Existing |
|
Up Trend |
Existing |
|
W |
Existing |
|
Union |
New |
|
Left Outer Join |
New |
|
Machine Learning |
K-Means. Anomaly Detection |
New |
Spatial |
Spatial General |
New |
Statistical |
Median |
New |
Correlation |
New |
|
Quantile |
New |
|
Standard Deviation |
New |
Oracle Stream Analytics provides various patterns.
General
Machine Learning
Spatial
Statistical.
The entire list of patterns is displayed category-wise on this dialog. Hover over each of the patterns to see its description.
To create a pattern:
An alternate way to create a pattern is to Click Patterns and select Use this pattern on the required pattern tile.
Use this pattern to obtain the first N events in a window range.
To create a Top N pattern:
The pattern is visually represented based on the data you have entered/selected.
Use the Bottom N pattern to obtain the last N events in a window range.
This section explains how to create a Bottom N pattern.
To create a Bottom N pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to detect when a numeric event field shows a specified trend change higher in value. For example, use this pattern to identify when the temperature value from a sensor device starts continuously increasing.
To create an Up Trend pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to detect when a numeric event field shows a specified trend change lower in value. For example, use this pattern to identify when the temperature value from a sensor device starts continuously decreasing.
To create a Down Trend pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to detect when an event data field value changes in a specific upward or downward fashion within a specific time window. For example, use this pattern to identify the variable changes in an Oil Pressure value are maintained within acceptable ranges.
To create a Fluctuation pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to build an exploration that eliminates duplicate events in your event stream.
To create an Eliminate Duplicates pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to detect when an event data field has duplicate values within a specified period of time. For example, use this pattern when the same order is placed twice within a day.
To create a Detect Duplicates pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to detect when an event data field value rises and falls in “W” fashion over a specified time window. For example, use this pattern when monitoring a market data feed stock price movement to determine a buy/sell/hold evaluation.
To create a W pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to detect an inverse W pattern with live output stream.
To create an Inverse W pattern:
The pattern is visually represented based on the data you have entered/selected.
Use this pattern to pattern to detect when 'B' doesn't occur within a specified period of time after 'A'.
Use this pattern to detect when an 'A' event is followed by a 'B' event within a specified period of time. Intermediate events are also allowed.
Use this pattern to calculate the standard deviation of the selected values with the expected values.
Use this pattern to calculate a correlation between two observable parameters of the live output stream.
Use this pattern to calculate the quantile of the event stream.
Use this pattern to calculate the median of an event stream with respect to a specific parameter.
Use this pattern to create a union of events from two streams. The event shape of both the streams must be the same.
Use this pattern to detect when one or more parameters are changed within specified period of time.
Oracle Stream Analytics detects changes within the specified period of time and sends output event (alert) either at the end of this period or either at the moment when changes do not happen any more. Let us consider the following graph for example.
Figure 7-23 Change Detector Pattern Example
Assume you specified duration equal to A-C interval. In "green" case you have values continuously changing from A to B within A-C interval. But, after the point B values do not change any more. So, you will receive alert at the moment B1.
In "blue" case you have values continuously changing during the whole interval - A-C. You will receive alert at the end of specified duration A-C, at the moment C.
Sometimes, you need to get alert immediately after any changes happen. That is in both cases "green" and "blue" cases, you will receive alert at the moment A1 because value had changed and continue receiving alerts until the point B in "green" case and point C in "blue" case.
As a workaround, you can minimize the window value to receive events just after the changes happen.
Use this pattern to explore data clusters and detect anomalies. K-Means is a widely used unsupervised machine learning algorithm for data exploration. K-Means is used in anomaly detection by identifying low density clusters (clusters with very few members), which equates to being less common. Oracle Stream Analytics supports 2 dimensional (2D) space of observations.
Use this pattern to analyze streams containing geo-location data and determine how events relate to pre-defined geo-fences in your maps.
Use this pattern to detect when an expected event does not occur within a specific time window. For example, use this pattern in circumstances when the next heartbeat event is missing.
Use this pattern to enrich original stream events with the data from external reference or another stream. If there are no records in the reference/stream then stream shows null values as the output.