In manufacturing, is common to extract sensor data in the following form, where A and B correspond to similar devices (known as assets).
(Input: Sensor data table)

In this format, the user needs to create a combined formula for each parent group. For example:

When handling several assets, this becomes cumbersome, so a better way is to stack the data per group asset.
To do this programmatically, we need contextual data containing the hierarchy. For example:
(Input: asset hierarchy)

In JSL, how can you move from the sensor data and hierarchy (inputs) to the asset table (desired output)?
(output: asset data table)

All tables and scripts are attached.