`
Integrating Oracle Internet of Things Cloud Service with Oracle Service Cloud
Top of Topic

Eliminate duplicates

Duplicate messages from the same device must be eliminated and not sent to Oracle Service Cloud. This is accomplished by creating a second exploration, whose input is the output of the first exploration.

Before you begin

About this task

The first exploration that you created will yield every reading where the temperature exceeds 25 °C. However, it is necessary to alert Oracle Service Cloud only that the temperature has exceeded 25 °C, rather than how many times or how frequently it has occurred. Therefore, it is sufficient if only one message per device is propagated to Oracle Service Cloud.

Procedure

  1. Under Explorations, click Add.

  2. Complete the following fields:

    Field Value
    Exploration Type Select Eliminate Duplicates from the drop-down menu.
    Exploration Name Enter a name, such as Deduplicate.

  3. Click Confirm.

    The exploration is created and the Deduplicate window appears.

  4. In the Deduplicate window, complete the following fields:

    Field Value
    Event Stream Select the name of the first exploration, for example, Temperature above 25 °C, from the drop-down menu.
    Duplicate Criteria Select source_id from the drop-down menu.
    Window Set the window to 4 minutes. It is recommended to set the window less than the evaluation frequency (in this example, five minutes).

  5. Click Actions at the top right of the page, then click Publish.

    You must publish the exploration before you can create a format.

  6. Click the plus sign (+) above Create Format.

  7. In the window that appears, click Create.

    The format is created.

Results

At this point, you have created an application that can accept messages from HVAC devices and apply filters on them, so that only messages that indicate temperatures in excess of 25 °C are retained. Additionally, the application eliminates duplicate messages, so that only one message from a specific device over a four-minute window is retained and the others discarded. Finally, the application publishes the filtered and deduplicated messages, so that external systems can subscribe to them.