Transformation Function

Transformation Functions allow you to modify, rename, and structure incoming data.

Overview

A Transformation Function in Qubitro allows you to modify, rename, and structure incoming data before it is stored or used for automation.

How Transformation Functions Work

JSONata for Data Transformation

Transformation Functions in Qubitro use JSONata, a lightweight query and transformation language designed for JSON data.

JSONata is optimized for real-time data processing, allowing flexible modifications without complex scripting.

For examples and best practices, check out our guidance.

Creating a Transformation Function

Transformation functions can be created from the Functions tab in the device details page:

1

Open the Functions Tab

  1. Navigate to the device details page in the Qubitro Portal.

  2. Click the Functions tab.

  3. Click Create function and select Transformation Function.

  4. Choose JSONata as the function type.

2

Write the JSONata Expression

  1. Enter your JSONata transformation logic in the editor.

  2. Modify, restructure, or filter data as needed.

  3. Click Test to validate the transformation output.

3

Save and Apply the Function

  1. Click Save and complete to activate the function.

  2. The function will now automatically process all incoming data for this device.

Last updated