The Octave Developer Hub

Welcome to the Octave developer hub. You'll find comprehensive guides and documentation to help you start working with Octave as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started

Transforming Events

You can write logic in your Cloud Action to perform a transformation on the Event received, and then create one or more new Events with different payloads. For example, you could read the value reported in an incoming Event such as a numeric temperature reading in degrees Celsius, convert that value to Fahrenheit, and return an event with the converted value.

This is accomplished by dynamically constructing and returning an event handler within the Cloud Action's script.

For example, the following code modifies the x field of event and then forwards a new event:

function(event) {

   // Your code here

   var new_event = event;
   new_event.elems.x += 1;

   return {
    "/my_company/transformed": [new_event],
    "/my_company/original": [event]

In this example, /my_company/transformed is the path that the new event is output to. The original event is also output into a /my_company/original Stream.

Updated 10 months ago

Transforming Events

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.