...
First of all you have to install the DDS Feature:
After that, you can download the MD PnP Software from here:
...
Choose Domain Id 0 (or remeber the choosen value) and run "Start ICE_Supervisor".
You can now "Create a local ICE Device Adap..."
...
Now run the query, and show as table. You should see something like:
As you can see, the values attribute contains a list, and the time attribute a tuple. If you want to store this data e.g. in a database this is not possible directly. You have to "flatten" the data. This can be done as follows:
TODO
Code Block | ||
---|---|---|
| ||
mappedValues = MAP({
expressions = [
'unique_device_identifier',
['elementAt(time,0)','seconds'],
['elementAt(time,1)','nanoseconds'],
'values'
]
},
sampleArray
)
table1 = UNNEST({
attribute = 'values'
},
mappedValues
)
table1_WithNumbers = MAP({
expressions = [
'unique_device_identifier',
'seconds',
'nanoseconds',
['counter()','pos'],
['values','value']
]
},
table1
)
table2 = MAP({
expressions = [
'unique_device_identifier',
['elementAt(time,0)','seconds'],
['elementAt(time,1)','nanoseconds'],
'metric_id',
'instance_id',
'unit_id',
'frequency'
]
},
sampleArray
) |
table1_WithNumbers is only necessary if you want to keep the order of the measurements.
The output will be as:
and