The chat responses are generated using Generative AI technology for intuitive search and may not be entirely accurate. They are not intended as professional advice. For full details, including our use rights, privacy practices and potential export control restrictions, please refer to our Generative AI Service Terms of Use and Generative AI Service Privacy Information. As this is a test version, please let us know if something irritating comes up. Like you get recommended a chocolate fudge ice cream instead of an energy managing application. If that occurs, please use the feedback button in our contact form!
Skip to content
Insights Hub and Industrial IoT

Insights Hub drives smart manufacturing through the industrial Internet of Things. Gain actionable insights with asset and operational data and improve your processes.

Event Analytics Client for Java¶

Introduction¶

The Event Analytics Java client allows you to analyze event data. In addition to the identification of significant dependencies, statistical analysis also helps the user to get a better understanding of the system's internal processes.

Event Analytics Operations¶

The Event Analytics statistically analyzes the event data to identify the most frequent events.

Client name: EventAnalyticsClient

Find Top Events¶

This method finds the N most frequently occurring events and returns them sorted by the number of occurrences in descending order.

// Creating the Event Analytics Input Metadata object
EventAnalyticsRequestMetadata inputMetadata = new EventAnalyticsRequestMetadata();
inputMetadata.setEventTextPropertyName("text");

// Creating a list of events to be analytically
Event firstEvent = new Event();
firstEvent.setText("INTRODUCING FUEL");
firstEvent.setTextQc(0);
firstEvent.setTime("2017-10-01T12:00:00.001Z");

Event secondEvent = new Event();
secondEvent.setText("Status@Flame On");
secondEvent.setTextQc(0);
secondEvent.setTime("2017-10-01T12:02:01.001Z");

List<Event> eventsList = new ArrayList<>();
eventsList.add(firstEvent);
eventsList.add(secondEvent);

// Creating the Event Analytics Input object that will be analyzed
EventAnalyticsRequest eventAnalyticsRequest = new EventAnalyticsRequest();
eventAnalyticsRequest.setNumberOfTopPositionsRequired(5);
eventAnalyticsRequest.setEventsMetadata(inputMetadata);
eventAnalyticsRequest.setEvents(eventsList);

List<EventAnalyticsResponse> eventAnalyticsResponse = null;
try {
    eventAnalyticsResponse = eventAnalyticsClient.findTopEvents(eventAnalyticsRequest);
} catch (MindsphereException e) {
    // Exception handling
}