Use Expressions to Transform Data at the Edge

Expressions in EasyEdge allow you to apply calculations and logic directly at the edge, ensuring data is delivered in the format your applications need.

You can apply transformations either at the Tag level or at the Data Stream level, depending on your project’s requirements.


When to Use Tag vs Data Stream Transformations

Tag Transformation

  • Transformation is applied as soon as the data is collected from the field.

  • Best when you want the transformed value to be available consistently across all uses of the Tag.

Example: Converting a sensor reading from watts (W) to kilowatts (kW) so that every application receives kW.

Data Stream Transformation

  • Transformation is applied only when data is sent to a specific application.

  • Best when you want to keep the raw data at the edge and transform it differently for different applications.

Example: Keeping the Asset Tag in watts (W) but delivering kilowatts (kW) only to one application, while another continues to use watts.


EasyEdge Expression Assistant

To make expression building easier, EasyEdge includes an Expression Assistant that works both on Tags and Data Streams.

  • As you type, the assistant suggests available functions (such as abs, avg, cos, sin, etc.) and helps you quickly insert them into your calculation.

  • Each variable you define is clearly mapped to its corresponding Data Field, making it simple to keep track of inputs.

  • The syntax is validated in real time, with a notification bar confirming whether the expression is valid before saving.

This ensures that your transformations and calculations are not only easier to build but also tested for correctness before deployment.

💡 Tip: For a complete list of supported functions and syntax, see the Expressions — Operations Engine page.


Example: Converting W to kW

Imagine you have a power sensor that provides values in watts (W), but your application requires kilowatts (kW).

Tag Transformation

  1. Create an Asset Tag for the Data Field providing W.

  1. In the Asset Tag configuration, add an Expression:

  1. The Tag will always return the value in kW.

Data Stream Transformation

  1. Keep the Asset Tag configured to store raw values in W.

  2. Create a Data Stream to your Application.

  1. In the Data Stream configuration, add an Expression:

  1. Only that Data Stream will provide values in kW, while the edge continues storing and processing W.


Key Considerations

  • Use Tag transformations for values you always want in the same unit or format.

  • Use Data Stream transformations for flexibility when different applications need data in different formats.

  • Expressions can include arithmetic operations, functions, and conditionals, allowing for more advanced transformations beyond unit conversions.

Last updated