This is an old revision of the document!
Select
Similar to flatten, this layer takes the values of a single row of the table into the attributes of the frame.
For example, if you have a table with the columns 'Temperature and 'Pressure', you can select one row of the table and those values for Temperature and Pressure will be recorded into the attributes of the frame.
This deletes the table.
Parameters
| Name | Default | Meaning |
|---|---|---|
| method | first | A method name. |
| value | The name of the column to search | |
| perc | 50 | The percentage to use with the perc method. |
| buffer | 5 | The number of samples to retain with the flat method |
Methods
The following methods are supported…
first: Uses the first record found in the table.
last: Uses the last record found in the table.
perc: Uses the perc % through the table. Ie. 50% will be half way through.
min: Uses the minimum value of the column.
max: Uses the maximum value of the column..
avg: Uses the median value of the column.
flat: Uses the longest period during which the value was stable.
Description
This layer is normally used to capture the activity of equipment at specific times or across periods of time.
Stability Testing
When using 'flat' as the method, only the nominated value column is checked.
The value is checked for stability across buffer samples of data. If you've requested the data at one-second resolution, this would be 5 seconds.
Example
If the frame contains the following table of data…
| Attribute | Value |
|---|---|
| StartTime | 09:00AM |
| EndTime | 10:00AM |
| Time | Machine.Speed | Machine.Voltage | Machine.Current |
|---|---|---|---|
| 09:00AM | 0 | 0 | 0 |
| 09:10AM | 0 | 240 | 3.2 |
| 09:20AM | 15 | 240 | 1.5 |
| 09:30AM | 18 | 240 | 1.5 |
| 09:30AM | 17 | 240 | 1.5 |
| 09:30AM | 17.5 | 240 | 1.5 |
{ "type": "select", "method": "first" }
The final results will add 'Machine.Speed' at 0, 'Machine.Voltage' as 0 and 'Machine.Current' as 0.
{ "type": "select", "method": "last" }
The final results will add 'Machine.Speed' at 17.5, 'Machine.Voltage' as 240 and 'Machine.Current' as 1.5.
{ "type": "select", "method": "flat", "value": "Machine.Speed" }
The final results will add 'Machine.Speed' at 18, 'Machine.Voltage' as 240 and 'Machine.Current' as 1.5.