DEV Community

tonipetov for Software AG Tech Community

Posted on • Originally published at on

Apama Analytics Builder

A new streaming analytics capability for Cumulocity IoT

Apama Analytics Builder is a new tool to radically reduce the time it takes to design, develop, and deploy analytics for Internet of Things applications. Analytics Builder gives engineers and other domain experts working on the IoT edge a web-based capability to develop analytic applications on streamed data, test them with simulated or live data, and deploy them immediately with a single click for the real-time processing of machine data and events. You can develop and run models that combine analytics from a library of pre-built blocks. Models can process measurements and event inputs, calculate averages and expressions and detect threshold breaches.

Overview of Analytics Builder

Cumulocity IoT Edge 10.4 (April 2019) now includes Apama Analytics Builder. Analytics Builder is a web app in Cumulocity IoT that allows you to quickly create models from a library of pre-built blocks. Analytic Builder models can be much more powerful and customizable than the Smart Rules templates included in Cumulocity IoT, and they are quicker and simpler to develop than writing Apama EPL code. Analytics Builder models can be as simple as “Create an operation when a measurement exceeds a threshold.” Models can scale to tens of blocks, producing multiple outputs, including derived measurements that can be inspected or used in further models. The model editor provides an easy drag-and-drop interface for selecting blocks, providing parameters and wiring connections between blocks. Model execution is handled by Apama and can execute data from different devices in parallel. The model manager shows all of the models and allows import, export, starting and stopping models for production, testing or simulating from historic data.

Figure 1: Model editor showing a simple model

Figure 1 shows a simple model in which a measurement value is received from a device and the average of the measurement’s value over a sliding window is computed in the “Average” block. The “Difference” block then takes the input value and the average value and calculates the difference. This is then emitted as a new measurement “avgDiff”.

Extensive analytic block library

Analytic blocks include:

  • Inputs from Cumulocity IoT measurements and events
  • Outputs to Cumulocity IoT measurements and operations
  • Logic blocks: And, Or, Not
  • Calculations: Crossing counter, delta, difference, direction detection, range lookup, rounding, threshold
  • Flexible expressions for mathematical expressions – e.g., (input1 * 1000) + input2
  • Aggregations over a window of values, defined by time or signals to define when to reset the window: Average, minimum, maximum, integral, gradient, standard deviation
  • Flow manipulation: Combiner, gate, latch, time delay
  • Utilities: Extract property, missing data, toggle

The block library will expand in future releases.


You can organize models with tags. The model manager can show all models or filter by mode (draft, production, test, and simulation), device, state (active/inactive) or tag. A model can generate a new measurement, which is both available to the rest of the Cumulocity IoT platform and also can be used as an input for other models. This makes it possible to generate derived measurements, such as the average value of a sensor, which you can view in Cumulocity IoT, use in dashboards, or use to build more complex models.

Figure 2: Model manager showing models in different modes and states

Use cases

Two main reasons to use Analytics Builder are:

  1. Generating new Key Performance Indicators (KPIs). For example, calculate moving averages across streams of device measurements and then use this KPI with the Cumulocity IoT dashboards.
  2. Condition monitoring and raising awareness of potential problems. For example, identify when measurements are missing or outside the expected bounds.


The first release of Analytics Builder is available for Cumulocity IoT Edge.

In October 2019, Software AG plans to make Analytics Builder available in Cumulocity IoT Cloud and on-premises. Plans for October 2019 also include the addition of new output blocks to generate alarms and a block SDK to allow users to write custom blocks in Apama EPL implementing their own specialized analytics.


Analytics Builder gives domain experts the ability to combine logic blocks together to build powerful models to process data available within a Cumulocity IoT Edge installation. Models can be developed easily in minutes, edited and tested within the Cumulocity IoT environment. For more information, talk to your Software AG representative.

Discussion (0)