Oracle® Fusion Middleware

Using Oracle Stream Analytics

12c Release (12.1.3)

E57479-06

November 2016

Describes how to use Oracle Stream Analytics to simplify the complex event processing.

Oracle Fusion Middleware Using Oracle Stream Analytics, 12c Release (12.1.3)

E57479-06

Copyright © 2015, Oracle and/or its affiliates. All rights reserved.

Primary Author: Oracle® Corporation

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.

Contents

Preface

- Audience

- Related Documents

- Conventions

What's New In This Guide?

1 Introduction to Oracle Stream Analytics

- 1.1 Oracle Stream Analytics User Interface

- 1.1.1 Sign In Page

- 1.1.2 Home Page

- 1.1.3 Catalog Page

- 1.1.4 Exploration Editor

- 1.1.5 Streams Wizard

- 1.1.6 References Wizard

- 1.2 Components of Oracle Stream Analytics

- 1.2.1 Stream

- 1.2.2 Reference

- 1.2.3 Exploration

- 1.2.4 Pattern

- 1.2.5 Shape

2 How to Set Oracle Stream Analytics Preferences

- 2.1 General Preferences

- 2.2 View Mode Preferences

- 2.3 Notifications Preferences

- 2.4 Catalog Preferences

- 2.5 Exploration - Live Output Stream Preferences

3 Working with Streams

- 3.1 Understanding Streams

- 3.1.1 Metadata

- 3.2 Creating a Stream

- 3.3 Editing a Stream

- 3.4 Restoring a Stream

- 3.5 Marking a Stream as Favorite

- 3.6 Deleting a Stream

4 Working with Explorations

- 4.1 Understanding Explorations

- 4.1.1 Metadata

- 4.1.2 Correlations

- 4.1.3 Filters

- 4.1.4 Summaries

- 4.2 Creating an Exploration

- 4.3 Editing an Exploration

- 4.4 Configuring a Target

- 4.5 Understanding a Draft Exploration

- 4.6 Publishing an Exploration

- 4.7 Unpublishing an Exploration

- 4.8 Exporting an Exploration

- 4.9 Reusing an Exploration

- 4.10 Marking an Exploration as Favorite

- 4.11 Deleting an Exploration

- 4.12 Restoring an Exploration

5 Working with References

- 5.1 Understanding References

- 5.2 Creating a Reference

- 5.3 Editing a Reference

- 5.4 Marking a Reference as Favorite

- 5.5 Deleting a Reference

6 Working with Patterns

- 6.1 Understanding Patterns

- 6.1.1 Top N

- 6.1.2 Bottom N

- 6.1.3 Up Trend

- 6.1.4 Down Trend

- 6.1.5 Fluctuation

- 6.1.6 Eliminate Duplicates

- 6.1.7 Detect Duplicates

- 6.1.8 Detect Missing Event

- 6.1.9 W

- 6.1.10 Inverse W

- 6.2 Creating Top N Pattern

- 6.3 Creating Bottom N Pattern

- 6.4 Creating Up Trend Pattern

- 6.5 Creating Down Trend Pattern

- 6.6 Creating Fluctuation Pattern

- 6.7 Creating Eliminate Duplicates Pattern

- 6.8 Creating Detect Duplicates Pattern

- 6.9 Creating Detect Missing Event Pattern

- 6.10 Creating W Pattern

- 6.11 Creating Inverse W Pattern

7 Sign Out of Oracle Stream Analytics

- 7.1 Signing Out

Preface

This document describes how to use Oracle Stream Analytics. The User Guide describes the various tasks that a user can perform using Oracle Stream Analytics.

Audience

This document is intended for all users of Oracle Stream Analytics and Event Processing.

Related Documents

For more information, see the following documents:

- Known Issues for Oracle SOA Products and Oracle AIA Foundation Pack at: http://www.oracle.com//technetwork/middleware/soasuite/documentation/soaknown-2644661.html.

- Developing Applications for Event Processing with Oracle Stream Analytics

- Getting Started with Event Processing for Oracle Stream Analytics

- Schema Reference for Oracle Stream Analytics

- Using Visualizer for Oracle Stream Analytics

- Customizing Oracle Stream Analytics

- Developing Applications with Oracle CQL Data Cartridges

- Oracle CQL Language Reference

- Java API Reference for Oracle Stream Analytics

- Administering Oracle Stream Analytics

- Getting Started with Oracle Stream Analytics.

- Oracle Database SQL Language Reference at: http://docs.oracle.com/cd/E16655_01/server.121/e17209/toc.htm

- SQL99 Specifications (ISO/IEC 9075-1:1999, ISO/IEC 9075-2:1999, ISO/IEC 9075-3:1999, and ISO/IEC 9075-4:1999)

- Oracle Stream Analytics Forum: http://forums.oracle.com/forums/forum.jspa?forumID=820

Conventions

The following text conventions are used in this document:

Convention

Meaning

boldface

Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.

italic

Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.

monospace

Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.

What's New In This Guide?

There are no changes in the 12c 12.2.1 release. This document summarizes the new features and significant product changes for Oracle Stream Analytics in the Oracle Fusion Middleware 12c Release (12.1.3.0) release.

Oracle Stream Analytics is a new tool introduced in the 12c Release (12.1.3.0) of Oracle Fusion Middleware.

This document is new for this release and describes the installation of Oracle Stream Analytics.

1 Introduction to Oracle Stream Analytics

Oracle Stream Analytics is very advanced, scalable, reliable, and flexible. Oracle Stream Analytics helps you in designing event processing applications with ease.

Oracle Stream Analytics is developed to simplify the complex event processing operations and make them available even to users without any technical background.

This chapter contains the following sections:

- Oracle Stream Analytics User Interface

- Components of Oracle Stream Analytics.

1.1 Oracle Stream Analytics User Interface

Oracle Stream Analytics user interface components are listed and explained at a high level in the sections that follow.

1.1.1 Sign In Page

Oracle Stream Analytics uses the same set of users and user roles configured in the Visualizer. Oracle Stream Analytics uses the same role-based authorization and authentication system provided by the Oracle Stream Analytics Event Processing Server.

Sign in to the Oracle Stream Analytics application using the following credentials:

- User Name: <the user name you have provided at the time of installation> (oepadmin is the default user)

- Password: <the password you have provided at the time of installation>

You can also sign in using any of the user accounts (with an administrator role) from the Oracle Stream Analytics Event Processing Server.

The Sign In page is as shown below:

Figure 1-1 Oracle Stream Analytics Sign in Page

1.1.2 Home Page

The Home page lists the industry verticals that Oracle Stream Analytics supports.

Each industry vertical has a tag associated with it and the tags are case-sensitive.

- Distributed Intelligence for IOT - Acquire, analyze, and act on high-volume, high-velocity data from sensors and devices both at the edge and in the data center in real-time. Tag for this vertical is IOT.

- Risk and Fraud Management - Leverage industry's best stream processing platform to assess risk and prevent financial fraud in real-time. Tag for this vertical is risk.

- Transportation and Logistics - Manage fleet, track assets, and improve supply chain efficiencies by combining streaming data with Oracle's advanced spatial functions. Tag for this vertical is transportation.

- Customer Experience and Consumer Analytics - Know the sentiment of your customers to reduce churn, improve loyalty, make offers, and attract customers in real-time. Tag for this vertical is customer.

- Telecommunications - Pro actively monitor your networks, predict network failures, and prevent distributed denial of service type attacks. Tag for this vertical is telecom.

Note:

For any application domain not available in this list, use the Distributed Intelligence for IOT vertical in the Catalog.

The Home page is as shown below:

Figure 1-2 Oracle Stream Explorer Home Page

1.1.3 Catalog Page

The Catalog page is the location where resources including explorations, streams, references, maps, connections, and targets are listed. This is the go-to place for you to perform any tasks in Oracle Stream Analytics.

The resources you see in the Catalog vary depending on the runtime you are using for the application.

You can mark a resource as a favorite in the Catalog by clicking on the Star icon. Click the icon again to remove it from your favorites. You can also delete a resource or view its topology using the menu icon to the right of the favorite icon. The Catalog page is as shown below:

Figure 1-3 Catalog Page

The tags applied to items in the Catalog are also listed on the screen below the left navigational pane. You can click any of these tags to display only the items with that tag in the Catalog. The tag appears at the top of the screen. Click Clear All at the top of the screen to clear the Catalog and display all the items. The following screen shows the Catalog when you select a tag:

Figure 1-4 Catalog with Tag Applied

You can include or exclude explorations, streams, references, maps, connections, and targets 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 components are displayed in the catalog.

When you want to display or view only a few or selective items in the catalog, unselect View All and select the individual components. Only the selected components will be shown in the catalog.

1.1.4 Exploration Editor

Exploration Editor, also known as the Explorer, allows you to create or edit the explorations in Oracle Stream Analytics.

1.1.5 Streams Wizard

Streams Wizard allows you to create or edit the streams in Oracle Stream Analytics.

1.1.6 References Wizard

References Wizard allows you to create or edit the references in Oracle Stream Analytics.

1.2 Components of Oracle Stream Analytics

The components of Oracle Stream Analytics are listed in the sections that follow.

1.2.1 Stream

A stream is a source of dynamic data. The data is flowing, it is not static or frozen. For example, stock prices of a particular company can be considered as a stream as the data comes in every second. Stream can be from EDN Server, JMS Server, REST Service, HTTP Pubsub Server, simulated from a CSV file (data dump), Kafka Adapter, Twitter Adapter, MQTT Adapter, Coherence Cache Adapter, or Event Generator.

1.2.2 Reference

A reference is a source of static data that provides contextual information about the event data. The metadata and contextual information of event data is stored in a reference. In this release, the only supported reference type is Oracle Database table.

1.2.3 Exploration

An exploration allows you to define business criteria for managing data (filters, summaries, group by, or correlations). The exploration is a visual representation of streaming data, expressions, and business rules. It lets you see how the business criteria apply and manage the data. You can add or attach a target to an exploration. But the target must be already created and configured.

1.2.4 Pattern

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

1.2.5 Shape

A shape is a representation of data definition within a stream (that is, an event type).

2 How to Set Oracle Stream Analytics Preferences

This chapter explains in detail about the Preferences that the user can set on the Oracle Stream Analytics. Based on the preferences the users set in this page, the characteristics of the Oracle Stream Analytics vary.

This chapter contains the following sections:

- General Preferences

- View Mode Preferences

- Notifications Preferences

- Catalog Preferences

- Exploration - Live Output Stream Preferences.

2.1 General Preferences

This section explains the general preferences that the user can set for Oracle Stream Analytics.

Figure 2-1 General Preferences

Start Page

Select if you want the Home page, the Catalog page, or the Patterns page to appear as the Start Page.

Note:
Patterns appears as an option only if the runtime is OEP.

Click Save to apply the changes you have made or click Restore To Default to retain the default settings.

2.2 View Mode Preferences

This section explains the view mode preferences that the user can set for Oracle Stream Analytics.

Figure 2-2 View Mode Preferences

Browser mode

Use this option to view the application in a browser mode, i.e., just like any other web application appears in a browser.

Presentation mode (projector)

Use this option to view the application in a presentation mode, i.e., as if the application is being viewed on a projector as a presentation. When you select the Presentation mode, a different color skin is applied to the application.

Click Save to apply the changes you have made or click Restore To Default to retain the default settings.

2.3 Notifications Preferences

This section explains the notifications preferences that the users can set for Oracle Stream Analytics.

Figure 2-3 Notifications Preferences

Show Information Notifications

Select this option if you want the information notifications to appear in the application. This option is selected by default.

Information Notification duration (in seconds)

Choose the number of seconds for which the notifications appear. 5 seconds is the default value.

Click Save to apply the changes you have made or click Restore To Default to retain the default settings.

2.4 Catalog Preferences

This section explains the catalog preferences that the user can set for Oracle Stream Analytics.

Figure 2-4 Catalog Preferences

Default Sorting Column

Select the column by which you want the columns to be sorted. This value will be used as the default for all columns until you change the value again.

Default Sorting Order

Select the sorting order by which you want the columns to be sorted. This value will be used as the default value for all columns until you change the value again.

Default Page Size

Select the value to be used as the default page size. Based on the value selected, the number of records that appear on a page vary. This value will be used as the default for all pages until you change the value again.

Click Save to apply the changes you have made or click Restore To Default to retain the default settings.

2.5 Exploration - Live Output Stream Preferences

This section explains the exploration preferences that the user can set for Oracle Stream Analytics.

Figure 2-5 Live Output Stream Preferences

Default Table Size

Select a value that you want to be applied as the default table size for the data in Live Output Stream of an exploration.

Click Save to apply the changes you have made or click Restore To Default to retain the default settings.

3 Working with Streams

This chapter explains the details about streams, creating streams, and editing streams.

This chapter contains the following sections:

- Understanding Streams

- Creating a Stream

- Editing a Stream

- Restoring a Stream

- Marking a Stream as Favorite

- Deleting a Stream.

3.1 Understanding Streams

An event stream is an Oracle Stream Analytics Event Processing adapter node producing events of a single type.

In Oracle Stream Analytics object taxonomy, an event stream is an entity responsible for receiving events from the outside world. There are different stream types based on different communications technology or messaging system, such as, for example, REST or JMS or Kafka.

3.1.1 Metadata

Every stream has the following set of metadata:

- Name

- Tags

- Description

- Created By

- Created At

- Updated By

- Updated At

- Is Favorite.

3.2 Creating a Stream

A stream is required for the users to create an exploration. This section explains how to create a stream. The Create Stream screen is shown below.

Figure 3-1 Create Stream - Source Details Dialog

To create a stream:

1. Navigate to Catalog.

2. Select Stream in the Create New Item menu.

3. Enter a name for the stream in the Name field. This is a mandatory field.

4. Provide a description that helps users understand about the stream in the Description field. This is an optional field.

5. Enter a tag with which you want to tag the stream in the Tag field. You can provide multiple tags. This is an optional field. You can separate the multiple tags by commas, Enter key, or a space.

Note:

The tags you enter must represent the industry verticals supported by Oracle Stream Analytics. For more information about pre-existing tags, see Home Page.

6. Select a stream type that you want to use for the stream from the Source Type field. This is a mandatory field.

Note:

If you select EDN as the source type, you can work only with an XML element that has a flat structure. The XML schema does not support any other schemas. The Stream wizard does not display all other types of EDN.

7. Select Create Exploration with this source (Launch Exploration Editor) if you want to launch the Exploration Editor utilizing this stream as the primary source.

8. Click Next. Based on the source type you have selected, you must enter data in the following fields on the Type Properties screen:

Figure 3-2 Create Stream - Type Properties Dialog

Table 3-1 Source Types for Streams

Source Type

Data Fields

CSV File

If the source type is CSV File, you must enter data in the following fields:

- Source Path - either upload a local CSV file or provide a URL to the location where the file resides. This is a mandatory field.

- Event Interval - the time interval at which the event refreshes. The time is in milliseconds. Default value is 1000 milliseconds, which is 1 second.

- Initial Delay (ms) - the time interval before which the data streaming starts. The time is in milliseconds. Default value is 0.

- Loop the CSV File - the option that allows you to keep the CSV source always running by automatically restarting it from the beginning of the file when the end of the file is reached.

HTTP Subscriber

If the source type is HTTP Subscriber, you must enter data in the following fields:

- Connections - the connection of the type HTTP Subscriber. This is a mandatory field.

- Password - password to access the HTTP Subscriber. This is a mandatory field.

EDN

If the source type is EDN, you must enter data in the following fields:

- Connections - a connection which is of type EDN. This is a mandatory field.

JMS

If the source type is JMS, you must enter data in the following fields:

- Connections - URL to access the JMS. This is a mandatory field.

- JNDI name - JNDI name (queue or topic) to access the JMS. This is a mandatory field.

REST

If the source type is REST, you must enter data in the following fields:

- Context Path - the context path of the REST Adapter. This is a mandatory field.

Coherence cache

If the source type is Coherence cache, you must enter data in the following fields:

- Connections - a connection which is of type coherence cache. This is mandatory field.

- Cache name — the name of the cache.

Kafka

If the source type is Kafka, you must enter data in the following fields:

- Connections - a connection which is of type Kafka. This is a mandatory field.

- Topic name — a topic name to be used in the stream. This topic name should have been defined at the time of creating the connection. This is a mandatory field.

- Group Id — a group id to be used for the stream. This id should have been defined at the time of creating the connection. This is an optional field.

MQTT

If the source type is MQTT, you must enter data in the following fields:

- Connections - a connection which is of type MQTT. This is a mandatory field.

Twitter

If the source type is Twitter, you must enter data in the following fields:

- Connections - connections of type Twitter. This is a mandatory field.

- Hashtags — the hashtags separated by commas that you want to include in your output stream. This is an optional field.

- Languages — the languages separated by commas you want to include in your output stream. This is an optional field.

- Users — list of Twitter user IDs separated by commas that you want to include in your output stream. This is an optional field.

At-least one of Hashtags or Users property needs to be specified.

Note:
The logical operator OR is used when you specify both Hashtags and Users. For more information, see https://dev.twitter.com/streaming/reference/post/statuses/filter.

Event generator

If the source type is Event generator, you must enter data in the following fields:

- Interval (ms) - the time interval between messages in milli seconds. This is an optional field.

- Lowest number — the lowest generated numeric value. This is an optional field.

- Highest number — the highest generated numeric value. This is an optional field.

- Precision — the number of decimal places. This is an optional field.

- Number of strings — the number of pre-generated strings. This is an optional field.

- Lowest number of words — the lowest number of words in the generated string. This is an optional field.

- Highest number of words — the highest number of words in the generated string. This is an optional field.

9. Click Next. The Create Stream - Shape screen appears.

Figure 3-3 Create Stream - Shape Dialog

10. Perform Manual Mapping or Select a Shape on the Shape screen.

When you perform manual mapping, you need to decide the best data type that is suitable for the value represented by each of the fields in the data source. The data types can be String, Byte, Integer, Big int, Float, Double, Big decimal, Boolean, Timestamp.

Note:

Providing a shape name is optional. If the shape is not specified, then this shape will not be available for reuse in the drop-down list.

If you Select Shape, the pre-existing configuration is used for your stream.

11. Click Create to create the stream. The new stream appears in the Catalog.

12. Click Cancel at any time to abort the operation.

3.3 Editing a Stream

After you create a stream, Oracle Stream Analytics provides you with an opportunity to edit the stream.

You cannot edit the stream when:

- there are published explorations using the stream

- you open the stream dialog from within the exploration.

To edit a stream:

1. Click the stream you want to edit from the Catalog.

2. Click Edit in the source dialog at the top.

Figure 3-4 Edit Source Dialog

Note:
The behavior of Edit at each section level in the current release is to launch the Edit Stream wizard. This implies that the Edit Stream - Source Details screen is the default screen you see.

3. Update the data you want to edit in the stream dialog.

Attention
A data type of Geometry for the fields in the data source is not available when you are using Spark runtime.

Note:
The logical operator OR is used when you specify both Hashtags and Users for a stream of type Twitter. For more information, see https://dev.twitter.com/streaming/reference/post/statuses/filter.

4. Select Loop the CSV file on the Edit Stream - Type Properties dialog. This feature allows you to keep the CSV source always running by automatically restarting it from the beginning of the file when the end of the file is reached.

Figure 3-5 Edit Stream — Loop the CSV File Feature

Note:
This feature is available only for the CSV source and not for any other type of source or target.

5. Click Save when you are done with updating or editing the stream.

6. Click Cancel at any point of time to abort the operation.

7. Click Done in the stream dialog to complete the edit operation.

3.4 Restoring a Stream

A stream goes to an invalid state if the stream or the corresponding Event Processing application is undeployed in the Visualizer. Oracle Stream Analytics allows you to restore a stream that is in an invalid state.

To restore an exploration:

1. Identify the stream that is in invalid state in the Catalog. The stream in invalid state is indicated by a red cross icon.

2. Click the Restore icon to the right of the stream to fix the deployment problems and restore the stream.

Figure 3-6 Restore Icon

A notification appears about the result of restore operation.

3.5 Marking a Stream as Favorite

You can mark a stream as Favorite. Marking a stream as Favorite allows you to locate and navigate such streams easily even if you have numerous items on the catalog.

To mark a stream as favorite:

1. Identify the stream you want to mark as favorite in the Catalog.

2. Click the Favorite icon to the right of the table row for that stream to mark it as a favorite. This icon acts as a toggle button.

Figure 3-7 Favorite Icon

3. Click the Favorite button again to remove the stream from favorites.

3.6 Deleting a Stream

You can delete a stream if you are sure you do not require the stream anymore. If a stream has dependencies, it cannot be deleted. A stream is said to have dependencies if it is part of a published exploration being used by any user.

To delete a stream with dependencies, you must delete the dependencies first.

To delete a stream:

1. Identify the stream you want to delete in the Catalog.

2. Click Delete Item option from the Actions menu to the right of the stream to delete it.

A confirmation dialog appears. If you select Delete, the stream will be deleted. Click Cancel if you do not want to delete the stream for any reason.

4 Working with Explorations

This chapter explains about explorations in Oracle Stream Analytics.

This chapter contains the following sections:

- Understanding Explorations

- Creating an Exploration

- Editing an Exploration

- Configuring a Target

- Understanding a Draft Exploration

- Publishing an Exploration

- Unpublishing an Exploration

- Exporting an Exploration

- Reusing an Exploration

- Marking an Exploration as Favorite

- Deleting an Exploration

- Restoring an Exploration.

4.1 Understanding Explorations

Explorations are Oracle Stream Analytics Event Processing applications that allow you to apply business logic to the event flows. Explorations are the visual representation of the data streamed from a source. The data in the exploration is represented visually in the form of:

- Live Output Stream - Live Output Stream shows the streaming data shapes in a tabular form.

Figure 4-1 Sample Live Output Stream

- Line Charts - Line charts are the primary way of visualizing time-series data. The X-axis is used to represent the time movement and allows natural scrolling of the data as time moves forward. The Y-axis is used to see the change of the dependent variable, that is, variable of interest, as time moves.

Figure 4-2 Sample Line Chart

- Scatter Charts - When the time dimension is not important, then data may be better understood by looking at a scatter plot. In this case, the user can assign distinct event properties to both the X-axis and Y-axis. However, values on both axes need to be numeric variables. Remember that the X-axis represents the explanatory variable and the Y-axis the response variable. Hence, the properties that indicate response or calculated field are better candidates to automatically assign to the Y-axis.
In the case of time-series, it is obvious that new values enter in the right side of the graph and old values exit in the left side. However, this behavior does not translate to scatter plots, as the new point may show up anywhere.

Figure 4-3 Sample Scatter Chart

Explorations allow you to:

- Use one or more streams and references as sources of events and data

- Correlate multiple event and data sources

- Filter events and data

- Group events and data

- Specify the time/event -based windows for aggregation functions

- Specify aggregation functions to be used in summaries

- Review incoming events (before you apply the logic) and resulting events (after you apply the logic) in tabular and graph forms

- Add targets

- Define or apply functions to the data in the live output stream

- Define Oracle Business Rules to the live data in the output stream

4.1.1 Metadata

Every exploration has the following set of metadata:

- Name

- Tags

- Description

- Created By

- Created At

- Updated By

- Updated At

- Is Favorite.

Tags, Description, and being Favorite are specified explicitly in the Exploration Editor. Creation and update information is persisted automatically.

Figure 4-4 Exploration Metadata

4.1.2 Correlations

When an exploration has more than one data source associated with it, a logical relation must be established between the data sources. This logical relation is known as correlation.

Oracle Stream Analytics allows the data sources to be joined using correlation rules. When all the sources are correlated, they provide a single event stream that can be further sent to a Target. Only fields of compatible types from different non-correlated sources may be used as operands in the correlation.

If your streams and references are not correlated, the exploration is in an invalid state and will remain so until you correlate the sources. The exploration will not be updated on the server until you correlate.

4.1.3 Filters

The conditions with which the output can be filtered are known as Filters. When you apply filters to the output, only the events that match ALL or ANY of the filters are displayed. You can filter events by comparing a left operand with a right operand using the following operators:

- equal to

- not equal to

- lower than

- lower than or equal to

- greater than

- greater than or equal to

- contains

- not contains

- is null

- not null.

Left operand can be any one of the following:

- a field of any source in the exploration

- a summary that is defined in the Summaries area.

Right operand can be any one of the following:

- a constant of a type that is compatible with the type of left operand

- a field or a summary of a field from a source of the left operand.

Add a Condition

To add a condition:

1. Click the Filter Field and select any field from the data source.

2. Click the Filter Operator and select the appropriate operator.

3. Enter a suitable value in the input field.

4. Select an appropriate datatype if the populated datatype is not correct.
A condition id added to the business rule.

5. Select match All or Match Any based on you requirement to filter.

Add a Group

Groups can be added to add nested queries.The events that match "AND" and "OR" conditions can be displayed:

To add a group:

1. Click the Filter Field and select any field from the data source.

2. Click the Filter Operator and select the appropriate operator.

3. Enter a suitable value in the input field.

4. Select an appropriate datatype if the populated datatype is not correct.
A group id added to the business rule applying the logical operator OR to added the condition..

5. Select match All or Match Any based on you requirement to filter.

4.1.4 Summaries

You can aggregate functions (Summaries) to fields and apply grouping by any combination of fields. The only exception is that a field cannot have both summary and be included in a Group. When you define summaries and/or grouping, all other non-aggregate and non-grouping fields will be automatically excluded from the results shape.

When you define a summary or grouping, the only fields allowed in the output are fields from Summaries and Group By area. When you define a summary, it is automatically shown in the results table and filters area is provided with an option to filter by this newly created Summary. When you remove or change the summary, if it is used in the filters and/or in output, you must confirm this action as it will affect the filter and/or output.

4.2 Creating an Exploration

This section explains how to create an exploration.

To create an exploration:

1. Navigate to Catalog.

2. Select Exploration in the Create New Item menu.

3. Enter information in the Create Exploration dialog. The Create Exploration screen is as shown below.

Figure 4-5 Create Exploration Dialog

a. Enter a name for the exploration in the Name field. This is a mandatory field.

b. Provide a description that helps users understand about this exploration in the Description field. This is an optional field.

c. Enter a tag with which you want to tag the exploration in the Tags field. You can provide multiple tags. This is an optional field.

d. Select a stream as the source for the exploration in the Source field. This can be another exploration that is in published state. This is a mandatory field. You can select multiple streams.

Note:

You cannot create an exploration based only on a reference as the source. You must start with a stream and then add reference(s) as source later.

Attention
When you are using Spark as the runtime, you cannot select multiple streams for the exploration. Only a single stream is supported.

4. Click Create to complete the creation of an exploration. The new exploration opens in the Exploration Editor. The newly created exploration also appears in the Catalog.
You can continue to add further to the newly created exploration in this editor:

- Correlation — You must add correlations between sources if the exploration uses more than one source.

- Summaries — You can add summary of the exploration data and then group the data accordingly. This is optional. See Summaries.

- Filters — You can add filters to further filter the data based on the summaries you have added to the exploration. This is optional. See Filters.

- Business Rules — You can add business rules to the data of your exploration. Business rules build conditional logic into the applications. This is optional.

- Expressions — You can add expressions to the streaming exploration data. The expressions help you in populating new data fields in the stream by performing calculations on the existing data. Adding expressions is optional

5. You can perform the actions on the columns in the Live Output Stream.

- Hide — hide any selected column

- Remove — remove any selected column

- Rename — rename any selected column

- Function — add an expression to any selected columns

- Restore — restore any removed columns. This option appears only when you have removed any column.

Figure 4-6 Actions You Can perform on the Individual Columns in the Live Output Stream

6. Click Cancel at any point of time to abort the operation.

4.3 Editing an Exploration

When you create an exploration, the exploration opens up in the Exploration Editor. You have the option to edit the parameters of the exploration. You can edit or update existing explorations. You can add or modify the data sources for the exploration.

To edit an exploration:

1. Navigate to the Catalog.

2. Identify the exploration that you want to edit or update. Click the name string of the exploration or the exploration icon to open it for editing. The Exploration Editor is as shown below.

Figure 4-7 Exploration Editor

3. Click anywhere in the Sources field to add or remove data sources. If you have more than one data source, the sources must be correlated.

4. Define the Correlations if the exploration has more than one data source.

Note:
Your changes to the exploration are not applied until the sources are correlated. An error message is generated when you try to save the changes without correlating the sources.

5. Click Add Summary in the Summaries area to add a summary to the exploration.

6. Click Add a Filter in the Filters area to add filters to the output. The filters further filter the streaming data based on the summaries you have added.

7. Click Properties in the Live Output Stream area to configure the properties of the output. You can indicate which fields must appear in the output stream.

- You can also add the Timestamp to the output stream. The timestamp at which the streaming data was captured appears against each row of live output stream. This is a toggle button and you can use it to switch ON or OFF the timestamp in the live data.

Note:

Only the fields that appear in the live output stream can be sent to the target.

8. Configure the number of graphs you want to be displayed for the output stream in the Charts area.

9. Click Window Drawer icon, available to the right of the screen, to specify time and event based windows used in processing your stream.

a. Select a value in the Range drop-down list and specify a numerical value. This value specifies the range of time period for the stream of data. The range is defined in units like now, nanoseconds, microseconds, milliseconds, seconds, minutes, hours, or events.
Now indicates that the range is as narrow as 1 nanosecond and unbounded indicates a range since the server has started. When the range is anything other than Now, another field, Evaluation frequency appears.

b. Select a value in the Evaluation frequency drop-down list and specify a numerical value. This value defines how often the system produces the result events.

Note:

Evaluation frequency cannot be greater than Range.

10. Click the pencil icon at the top-right corner to view the information of the exploration.

a. Click Edit Info to update Name, Description, or Tags of the exploration.

Figure 4-8 Update Information of Exploration

b. Click Done after updating the information.

11. Click Undo Changes icon at the top-right corner to undo the changes you have made. The Undo is applicable only on the following changes:

- add/edit/delete summary

- group by

- add/edit/delete filter

- specifying range.

Note:

Undo operation is not available for publish action. To undo a publish, you must unpublish the exploration.

Figure 4-9 Undo Changes Icon

Note:

Clicking Undo once, reverses only the last made change.

12. Click Redo Changes icon at the top-right corner to re-apply the changes you have made. The Redo is applicable only on the following changes:

- add/edit/delete summary

- group by

- add/edit/delete filter

- specifying range.

Figure 4-10 Redo Changes Icon

Note:

Clicking Redo once, re-applies only the last made change.

13. Click the User Assistant icon at the top-right corner to view explanation about the Exploration Editor. This icon acts as a toggle button.

Figure 4-11 User Assistant Icon

Note:

When you edit an exploration, you must publish it again for the changes to be implemented.

4.4 Configuring a Target

Every exploration must be configured with a target to send the details downstream. Unless the exploration is published, you cannot send the events downstream to the configured target.

To configure a target:

1. Click Configure a Target in the Exploration Editor. The Configure a Target dialog appears.

Figure 4-12 Configure a Target Dialog

2. Select the Destination Type in the Configure a Target dialog.

Destination Type

Data Fields

CSV File

If the destination type is CSV File, you must enter data in the following fields:

- File Name - name of the CSV file. This is a mandatory field.

- Append - indicates that you do not want to re-create the file and want to add events to the existing file (generally a non-empty file)

Under Oracle Stream Analytics event structure, two folders/directories are created under the server name:

- FileStorage

- <username> - the file name you specify for the CSV file goes under this directory.

HTTP Publisher

If the destination type is HTTP Publisher, you must enter data in the following fields:

- Server URL - the location of the HTTP Publisher. This is a mandatory field. If you use Oracle Stream Analytics's own publisher, the URL is: http://host:port/pubsub.

- Channel - the channel of the HTTP Publisher. This is a mandatory field.

- Username - username to access the HTTP Publisher

- Password - password to access the HTTP Publisher

EDN

If the destination type is EDN, you must enter data in the following fields:

- URL - the location of the EDN. This is a mandatory field.

- Username - username to access the EDN. This is a mandatory field.

- Password - password to access the EDN. This is a mandatory field.

- Get Event Definitions - retrieves the event definitions.

- Select Shape - select a shape from the drop-down list.

- Target Property - target shape property.

- Output Stream Property - select a corresponding shape for the exploration property, or No mapping if you do want to map.

JMS

If the destination type is JMS, you must enter data in the following fields:

- URL - the location of JMS. This is a mandatory field.

- Username - username to access the JMS

- Password - password to access the JMS

- JNDI Name - the JNDI queue name of JMS

REST

If the destination type is REST, you must enter data in the following fields:

- Target URL - the location of the REST service the exploration will invoke with the resulting messages. This is a mandatory field.

3. Click Finish in the Configure a Target screen to configure the exploration.

4. Click Cancel at any point of time to abort the operation.

4.5 Understanding a Draft Exploration

When you create an exploration, it is in draft state by default. The draft exploration is not available to other users of the application. An exploration moves to a published state when it is published.

When a published exploration is deleted or unpublished, the exploration moves to a draft state.

A draft exploration has the following distinctive features:

- it gets undeployed from the runtime once the Exploration Editor is closed

- it is not sending events into the target even if there is a target. You have to publish the exploration before events appear in the target.

4.6 Publishing an Exploration

You must publish an exploration to make the exploration available for all the users of Oracle Stream Analytics. A published exploration:

- can be used as a source for another exploration

- will be visible to other users of the application

- is in running state until another user unpublishes or deletes the exploration

- can have targets applied.

To publish an exploration:

1. Navigate to the Catalog.

2. Identify the exploration you want to publish and click its name or icon.

3. Select Publish from the Actions menu.

Figure 4-13 Actions Menu

The exploration gets published and you can see a confirmation message. When the exploration is published, it is indicated in the Catalog as shown in the figure below.

Figure 4-14 Published Exploration

You can publish/re-publish an exploration when no consumers are using it, in the following scenarios:

- Re-publish a published exploration with no changes

- Publish a published exploration after modifying its details (a published exploration moves to Draft status when it is modified). After publishing, the draft status changes to published status.

- Re-publish an exploration that has a target configured.

When more than one user tries to publish the exploration after modifications, a conflict arises. The following conflict resolution actions help you in resolving the conflict:

a. Click Overwrite to overwrite the published version with the changes you have made.

b. Click Discard to discard your changes and go to the latest published version of the exploration.

c. Click Clone to publish the exploration under a different name, retaining changes from multiple users.

Note:
If there are any users using a published exploration, you cannot re-publish that exploration until you clear the dependencies.

4.7 Unpublishing an Exploration

You can unpublish an exploration that has already been published.

Note:
If there are users using a published exploration, you cannot un-publish that exploration until you clear all the dependencies.

To unpublish an exploration:

1. Navigate to the Catalog.

2. Identify the published exploration you want to configure and click it.

3. Select Unpublish from the Actions menu.

The exploration gets unpublished and you can see a confirmation message. When the exploration is unpublished, the Published status changes to Draft in the Catalog.

Figure 4-15 Unpublished Exploration

Note:

You cannot un-publish a published exploration when it is being used by any user.

4.8 Exporting an Exploration

Oracle Stream Analytics allows you to export an exploration as a JAR file and download it for reuse. If you try to export an exploration that is not published, you get an error message.

You can import the exported exploration into JDeveloper and develop the application. However, you cannot import an application or exploration into Oracle Stream Analytics.

Remember
You cannot export an exploration when you are using Spark as the runtime environment.

To export an exploration:

1. Navigate to the Catalog.

2. Identify the published exploration you want to export and click it.

3. Select Export from the Actions menu.

Figure 4-16 Export Exploration

The Export Exploration dialog is as shown below:

Figure 4-17 Export Exploration Dialog

4. Review the details of the exploration under Export List. Resource is the name of the exploration and its dependencies to be exported. Type is the type of the resource (exploration/source).

5. Edit/update the exploration bundle details under Advanced Options if required.

a. Enter a value in the Bundle ID field. This is an OSGI Bundle-SymbolicName parameter which is unique OSGI Bundle and will be the name of the exported JAR file.

b. Enter a value in the Bundle Name field. This is the name with which the exploration will be exported.

6. Click Export to complete exporting the exploration. The exploration is saved as a jar file. You can save the JAR file to any location.

Figure 4-18 Save Exported Exploration

7. Click Cancel at any point of time to abort the operation.

If an exploration uses any target or sources with specified user credentials (EDN, JMS, HTTP pubsub), then the exported exploration contains the credentials with encrypted passwords. Passwords are encrypted with the server encryption key. Usually, different servers use different encryption keys. As a result, you must update the encrypted passwords or convert them to plain text passwords before deploying the exploration to a server. If you do not do this, an encryption error appears.

4.9 Reusing an Exploration

You can re-use an existing exploration as a source for another exploration.

Remember
You cannot export an exploration when you are using Spark as the runtime environment.

4.10 Marking an Exploration as Favorite

You can mark an exploration as Favorite. Marking an exploration as Favorite allows you to locate and navigate such explorations easily even if you have numerous items on the catalog.

To mark an exploration as favorite:

1. Identify the exploration you want to mark as favorite in the Catalog.

2. Click the Favorite icon to the right of the exploration to mark it as a favorite. This icon acts as a toggle button.

Figure 4-19 Favorite Icon

3. Click the Favorite icon to remove the exploration from favorites.

4.11 Deleting an Exploration

You can delete an exploration if you are sure you do not require the exploration anymore. When you delete a published exploration, it moves into a draft state. When an exploration is available in both draft and published state, the delete operation first deletes the draft exploration. When you invoke delete operation for the second time on the same exploration, the exploration gets deleted.

To delete an exploration:

1. Identify the exploration you want to delete in the Catalog.

2. Click the Delete icon to the right of the exploration to delete it.

Figure 4-20 Delete Icon

A confirmation dialog appears. If you select OK, the exploration will be deleted.

4.12 Restoring an Exploration

An exploration goes to an invalid state in any of the following scenarios:

- if the deployment was removed from the Visualizer

- the EDN source could not start because of a network issue

- a CSV source could not start because of the file absence

- the corresponding Event Processing application was undeployed or paused on the Event Processing Server

The above stated scenarios are a few amongst the reasons why an exploration can go into an invalid state.

Invalid state indicates that there is no deployment for the object, either a source or a published exploration.

You can restore an exploration. The restore operation tries to deploy an object in invalid state with the information available in Oracle Stream Analytics. For example, there is an exploration E1 that uses the source S1, and both of them are in invalid state. When you invoke a restore operation on the exploration, the Oracle Stream Analytics tries to deploy both the stream and exploration in sequence.

To restore an exploration:

1. Identify the exploration that is in invalid state in the Catalog. The exploration in invalid state is indicated by a red cross icon.

Figure 4-21 Exploration in Invalid State

2. Click the Restore icon to the right of the exploration to fix the deployment problems and restore the exploration.

Figure 4-22 Restore Icon

A notification appears about the result of restore operation.

5 Working with References

This chapter explains about references in Oracle Stream Analytics.

This chapter contains the following sections:

- Understanding References

- Creating a Reference

- Editing a Reference

- Marking a Reference as Favorite

- Deleting a Reference

5.1 Understanding References

Oracle Stream Analytics allows you to create references to static data to enrich the event streams.

5.2 Creating a Reference

Steps required to create a reference are listed in this section.

To create a reference:

1. Navigate to Catalog.

2. Select Reference in the Create New Item menu.

3. Enter information in the Create Reference dialog. The Create Reference - Source Details screen is as shown below.

Figure 5-1 Create Reference - Source Details Dialog

a. Enter a name for the reference in the Name field. This is a mandatory field.

b. Provide a description that helps users understand about this reference in the Description field. This is an optional field.

c. Enter a tag with which you want to tag the reference in the Tags field. You can provide multiple tags. This is an optional field.

d. Select a source type from the Source Type drop down list. The source must be defined in Oracle Stream Analytics Visualizer. This is a mandatory field.

Note:

In this release, only Database Table (Oracle Database) is supported. The driver oracle.jdbc.driver.OracleDriver is deprecated and not supported. Use oracle.jdbc.OracleDriver instead in the config.xml file.

4. Click Next to go to the Type Properties screen. The Create Reference - Type Properties screen is as shown below.

Figure 5-2 Create Reference - Type Properties Dialog

a. Select a Data source name.

b. Click Back at any point if you want to change any of the details.

5. Click Next to go to the Shape screen. The Create Reference - Shape screen is as shown below.

Figure 5-3 Create Reference - Shape Dialog

a. Select a Shape for the reference.
The shape is applied on based on the pre-existing shape you choose.

6. Click Create to complete the creation of a reference. The new reference appears in the catalog.

7. Click Cancel at any point of time to abort the operation.

5.3 Editing a Reference

Oracle Stream Analytics allows you edit or update an existing reference. This section explains how to edit a reference.

To edit a reference:

1. Navigate to Catalog.

2. Identify the reference you that want to edit. Click the name string of the reference or the reference icon to open it for editing. The reference details screen appears and it is as shown below.

Figure 5-4 Edit Reference Screen

3. Click Edit in the top-right corner of the screen. The Edit Reference - Source Details screen is as shown below.

Figure 5-5 Edit Reference - Source Details Dialog

a. Update the name of the reference, if required.

b. Update the description of the reference, if required.

c. Add or update the tags with which you want to tag the reference. You can provide multiple tags.

d. The Source Type cannot be modified in this release. Hence, it is disabled.

4. Click Next to go to the Type Properties screen. The Edit Reference - Type Properties screen is as shown below.

Figure 5-6 Edit Reference - Type Properties Dialog

a. Select a different Data source name if you want to update the source.

b. Click Back at any point if you want to change any of the details.

5. Click Next to go to the Shape screen. The Edit Reference - Shape screen is as shown below.

Figure 5-7 Edit Reference - Shape Dialog

a. Select a different Shape if you want to update the shape of the reference.

6. Click Save to complete the editing of a reference.

7. Click Cancel at any point of time to abort the operation.

8. Click Done on the reference details page to complete the operation. The update reference appears in the catalog.

5.4 Marking a Reference as Favorite

You can mark a reference as Favorite. Marking a reference as Favorite allows you to locate and navigate such reference easily even if you have numerous items on the catalog.

To mark a reference as favorite:

1. Identify the reference you want to mark as favorite in the Catalog.

2. Click the Favorite icon to the right of the reference to mark it as a favorite. This icon acts as a toggle button. Click this button again to remove the reference from favorites.

Figure 5-8 Favorite Icon

5.5 Deleting a Reference

You can delete a reference if you are sure yo do not require the reference anymore. If a reference has dependencies, it cannot be deleted. A reference is said to have dependencies if it is part of a published exploration being used by any user. To delete a reference with dependencies, you must delete the dependencies first.

To delete a reference:

1. Identify the reference you want to delete in the Catalog.

2. Click the Delete icon to the right of the reference to delete it.

Figure 5-9 Delete Icon

A confirmation dialog appears. If you select OK, the reference will be deleted.

6 Working with Patterns

This chapter explains the details about Patterns.

This chapter contains the following sections:

- Understanding Patterns

- Creating Top N Pattern

- Creating Bottom N Pattern

- Creating Up Trend Pattern

- Creating Down Trend Pattern

- Creating Fluctuation Pattern

- Creating Eliminate Duplicates Pattern

- Creating Detect Duplicates Pattern

- Creating Detect Missing Event Pattern

- Creating W Pattern

- Creating Inverse W Pattern.

6.1 Understanding Patterns

Oracle Stream Analytics provides a feature known as patterns. A pattern provides you with the results displayed in a live output stream based on common business scenarios. 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.

6.1.1 Top N

A Top N pattern is used to create a pattern of the first N events in the specified window of an event stream.

6.1.2 Bottom N

A Bottom N pattern is used to create a pattern of the last N events of an event stream. Logically, this type of pattern is the reverse of Top N pattern.

6.1.3 Up Trend

An Up Trend pattern detects when the up trend starts and continues to grow. For example, use this pattern to identify when the temperature value from a sensor device starts increasing continuously.

6.1.4 Down Trend

A Down Trend pattern detects when a numeric event field shows a change in a specified trend, lower in value. For example, use this pattern to identify when the temperature value from a sensor device starts continuously decreasing.

6.1.5 Fluctuation

A Fluctuation pattern detects when an event data field value changes in a specific upward or downward fashion within a specific time p. For example, use this pattern to identify the variable changes in Oil Pressure values within acceptable ranges.

6.1.6 Eliminate Duplicates

The Eliminate Duplicates pattern is used to build an exploration that eliminates duplicate events in a specific event stream.

6.1.7 Detect Duplicates

The Detect Duplicates pattern detects 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.

6.1.8 Detect Missing Event

The Detect Missing Event pattern detects when an expected event does not occur within a specified time window. For example, use this pattern in circumstances when the next heartbeat event is missing.

6.1.9 W

The W pattern detects when an event data field value rises and falls in a W fashion over a specified time period. For example, use this pattern when monitoring a market data feed stock price movement to determine a buy/sell/hold evaluation.

6.1.10 Inverse W

The Inverse W pattern detects the inverses of W. Logically, this pattern is the reverse of the W pattern.

6.2 Creating Top N Pattern

Use this pattern to obtain the first N events in a window range.

To create a Top N pattern:

1. Navigate to the Catalog.

2. Select Create New Item >Pattern > Top N. You can also click Patterns and select Top N.The create pattern screen appears as shown below:

Figure 6-1 Create Top N Pattern

3. Select an Event Stream.

4. Enter a value for Window Range and select its unit (one of nanoseconds, milliseconds, microseconds, seconds, minutes, and hours). This number must be greater than or equal to 1.

A Window range is the range from which the output is generated.

5. Enter a value for Window Slide and select its unit (one of nanoseconds, milliseconds, microseconds, seconds, minutes, and hours). This is the frequency at which you want to refresh the data.

6. Select a value in the Order by Criteria field. You can select multiple fields.

7. Enter a value in the Number of Events field. This number must be greater than or equal to 1. This is the number that indicates the number of events to be considered for the pattern.

The pattern is visually represented based on the data you have entered/selected.

6.3 Creating Bottom N Pattern

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:

1. Navigate to the Catalog.

2. Select Create New Item >Pattern > Bottom N. You can also click Patterns and select Bottom N.The create pattern screen appears as shown below:

Figure 6-2 Create Bottom N Pattern

3. Select an Event Stream.

4. Enter a value for Window Range and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This number must be greater than or equal to 1.

A Window range is the range from which the output is generated.

5. Enter a value for Window Slide and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the frequency at which you want to refresh the data.

6. Select a value in the Order by Criteria field. You can select multiple fields.

7. Enter a value in the Number of Events field. This number must be greater than or equal to 1. This is the number that indicates the number of events to be considered for the pattern.

The pattern is visually represented based on the data you have entered/selected.

6.4 Creating Up Trend Pattern

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:

1. Navigate to the Catalog.

2. Select Create New Item >Pattern > Up Trend. You can also click Patterns and select Up Trend.The create pattern screen appears as shown below:

Figure 6-3 Create Up Trend Pattern

3. Select an Event Stream.

4. Enter a value for Partition Criteria. This value is used for partitioning the data in the event stream.

These are the fields in which you want to track the trend.

5. Enter a value for Duration and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the interval within which the application looks for a pattern match.

6. Select a value in the Tracking Field drop-down. You can select only 1 item.

This is a source field whose behavior follows the trend for the pattern to emit the event.

The pattern is visually represented based on the data you have entered/selected.

6.5 Creating Down Trend Pattern

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:

1. Navigate to the Catalog.

2. Select Create New Item > Pattern > Down Trend. You can also click Patterns and select Down Trend. The create pattern screen appears as shown below:

Figure 6-4 Create Down Trend Pattern

3. Select an Event Stream.

4. Enter a value for Partition Criteria. This filed can be used to partition the data in the event stream.

These are the fields in which you want to track the trend.

5. Enter a value for Duration and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the interval within which the application looks for a pattern match.

6. Select a value in the Tracking Value field. You can select only 1 item.

This is a source field whose behavior follows the trend for the pattern to emit the event.

The pattern is visually represented based on the data you have entered/selected.

6.6 Creating Fluctuation Pattern

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:

1. Navigate to the Catalog.

2. Select Create New Item > Pattern > Fluctuation. You can also click Patterns and select Fluctuation. The create pattern screen appears as shown below:

Figure 6-5 Create Fluctuation Pattern

3. Select an Event Stream.

4. Enter a value for Partition Criteria. This field can be used to partition the data in the event stream.

These are the fields in which you want to track the trend.

5. Enter a value in the Tracking Field. This value is used to track the event data and create a pattern in the live output stream.

6. Enter a value for Window and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the frequency at which you want to refresh the data.

7. Enter a value for Deviation Threshold %. This value indicates the percentage of deviation you want to be included in the pattern.

This is the interval in which the application looks for a matching pattern.

The pattern is visually represented based on the data you have entered/selected.

6.7 Creating Eliminate Duplicates Pattern

Use this pattern to build an exploration that eliminates duplicate events in your event stream.

To create an Eliminate Duplicates pattern:

1. Navigate to the Catalog.

2. Select Create New Item > Pattern > Eliminate Duplicates. You can also click Patterns and select Eliminate Duplicates. The create pattern screen appears as shown below:

Figure 6-6 Create Eliminate Duplicates Pattern

3. Select an Event Stream.

4. Enter a value for Duplicate Criteria.

This is the field that you want to eliminate for duplicate keys.

5. Enter a value for Window and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the range within which the application searches for duplicates.

The pattern is visually represented based on the data you have entered/selected.

6.8 Creating Detect Duplicates Pattern

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:

1. Navigate to the Catalog.

2. Select Create New Item > Pattern > Detect Duplicates. You can also click Patterns and select Detect Duplicates. The create pattern screen appears as shown below:

Figure 6-7 Create Detect Duplicates Pattern

3. Select an Event Stream.

4. Enter a value for Duplicate Criteria.

This is the field that you want to look for duplicate keys.

5. Enter a value for Window and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the interval in which the application looks for duplicates.

The pattern is visually represented based on the data you have entered/selected.

6.9 Creating Detect Missing Event Pattern

This section explains how to create a Detect Missing Event pattern.

To create a Detect Missing Event pattern:

1. Navigate to the Catalog.

2. Select Pattern -> Detect Missing Event under the Create New Item menu. The create pattern screen appears as shown below:

Figure 6-8 Creating Detect Missing Event Pattern

3. Select an Input stream.

4. Enter a value for Tracking Fields. You can select multiple fields.

These are the fields with which you track and identify the missing events.

5. Enter a value for Heartbeat Interval and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the interval in which the application looks for an event. If the event does not appear in the specified interval, the application generates an event indicating that there is something missing, i.e., an event should have appeared here, but not.

The pattern is visually represented based on the data you have entered/selected.

6.10 Creating W Pattern

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:

1. Navigate to the Catalog.

2. Select Create New Item > Pattern > W. You can also click Patterns and select W. The create pattern screen appears as shown below:

Figure 6-9 Create W Pattern

3. Select an Event Stream.

4. Enter a value for Partition Criteria. You can select multiple fields.

These are the fields by which the data is partitioned to form a W.

5. Enter a value for Window and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the interval in which the application looks for a matching pattern.

6. Select a numeric value for Tracking Value based on which variation constitutes a W-shape for the pattern-based exploration to produce event.

The pattern is visually represented based on the data you have entered/selected.

6.11 Creating Inverse W Pattern

Use this pattern to detect an inverse W pattern with live output stream.

To create an Inverse W pattern:

1. Navigate to the Catalog.

2. Select Create New Item > Pattern > Inverse W. You can also click Patterns and select Inverse W. The create pattern screen appears as shown below:

Figure 6-10 Create Inverse W Pattern

3. Select an Event stream.

4. Enter a value for Partition Criteria.

This is the field by which the data is partitioned to form an inverse W.

5. Enter a value for Window and select its unit (one of nanoseconds, milliseconds, seconds, minutes, and hours). This is the interval in which the application looks for a matching pattern.

6. Select a numeric value for Tracking Value based on which variation constitutes an inverse W-shape for the pattern-based exploration to produce event.

The pattern is visually represented based on the data you have entered/selected.

7 Sign Out of Oracle Stream Analytics

This chapter explains the details about signing out of the Oracle Stream Analytics application.

7.1 Signing Out

After you are done with using the Oracle Stream Analytics application, you must sign out of the application.

To sign out:

1. Click the username at the top-right corner of the screen.

2. Select Sign Out in the drop-down list.

Figure 7-1 Signout

You are signed out of the application and taken back to the Sign In page. Sign In again to use the Oracle Stream Analytics application. For more information about signing in, see Sign In Page.

Oracle Legal Notices

Copyright Notice

Copyright © 1994-2018, Oracle and/or its affiliates. All rights reserved.

License Restrictions Warranty/Consequential Damages Disclaimer

This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited.

Warranty Disclaimer

The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing.

Restricted Rights Notice

If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable:

U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs. No other rights are granted to the U.S. Government.

Hazardous Applications Notice

This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications.

Trademark Notice

Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.

Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group.

Third-Party Content, Products, and Services Disclaimer

This software or hardware and documentation may provide access to or information about content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services unless otherwise set forth in an applicable agreement between you and Oracle. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services, except as set forth in an applicable agreement between you and Oracle.

Pre-General Availability Draft Documentation Notice

If this document is in public or private pre-General Availability status:

This documentation is in pre-General Availability status and is intended for demonstration and preliminary use only. It may not be specific to the hardware on which you are using the software. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to this documentation and will not be responsible for any loss, costs, or damages incurred due to the use of this documentation.

Private Pre-General Availability Draft Documentation Notice

If this document is in private pre-General Availability status:

The information contained in this document is for informational sharing purposes only and should be considered in your capacity as a customer advisory board member or pursuant to your pre-General Availability trial agreement only. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described in this document remains at the sole discretion of Oracle.

This document in any form, software or printed matter, contains proprietary information that is the exclusive property of Oracle. Your access to and use of this confidential material is subject to the terms and conditions of your Oracle Master Agreement, Oracle License and Services Agreement, Oracle PartnerNetwork Agreement, Oracle distribution agreement, or other license agreement which has been executed by you and Oracle and with which you agree to comply. This document and information contained herein may not be disclosed, copied, reproduced, or distributed to anyone outside Oracle without prior written consent of Oracle. This document is not part of your license agreement nor can it be incorporated into any contractual agreement with Oracle or its subsidiaries or affiliates.

Documentation Accessibility

For information about Oracle's commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.

Access to Oracle Support

Oracle customers that have purchased support have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.