Data selection examples
- Last UpdatedAug 18, 2025
- 2 minute read
- PI System
- Adapter for RDBMS 1.1
- Adapters
There are two ways to configure a selection item.
-
By Column: Uniquely identify a stream using the columns from the result set. This method is simplest.
-
By Row: Uniquely identify a stream using the rows from the result set. This method is more complex, but more common.
The following sections contain examples of valid RDBMS data selection configurations.
Column as an identifier
Use this configuration when you have a table whose columns identify each stream in the result set. In the simplest of cases, there is one value column and one timestamp column; however, there could be multiple values and multiple timestamps. A separate data selection item needs to be defined for each timestamp value pair.
Example data
|
Temperature |
Pressure |
Volume |
SampleTime |
|---|---|---|---|
|
25 |
100 |
50.6 |
11/11/2020 3:56:00 AM |
|
26.3 |
100.2 |
50.7 |
11/11/2020 3:26:00 AM |
Temperature
[
{
"streamId": "Tank1.Temperature",
"valueColumn": "Temperature",
"indexColumn": "SampleTime",
"scheduleId": "1min",
"queryId": "Tank1",
"selected": true
}
]
Pressure:
[
{
"streamId": "Tank1.Pressure",
"valueColumn": "Pressure",
"indexColumn": "SampleTime",
"scheduleId": "1min",
"queryId": "Tank1",
"selected": true
}
]
Volume:
[
{
"streamId": "Tank1.Volume",
"valueColumn": "Volume",
"indexColumn": "SampleTime",
"scheduleId": "1min",
"queryId": "Tank1",
"selected": true
}
]
Example complex data
|
Lat |
Lon |
X_Col |
Y_Col |
Z_Col |
|---|---|---|---|---|
|
15.294533 |
20.479839 |
1.1 |
2.2 |
3.3 |
|
36.33403 |
-82.4019478 |
4.1 |
5.2 |
6.4 |
|
35.53565 |
-82.5529333333333 |
7.1 |
8.2 |
9.3 |
Coordinates and Geolocation
[
{
"streamId": "ComplexQuery.Coordinates",
"dataColumns": {
"X": "X_Col",
"Y": "Y_Col",
"Z": "Z_Col"
},
"scheduleId": "1",
"queryId": "ComplexQuery",
"selected": true
},
{
"streamId": "ComplexQuery.Geolocation",
"dataColumns": {
"latitude": "Lat",
"longitude": "Lon"
},
"scheduleId": "1",
"queryId": "ComplexQuery",
"selected": true
}
]
Identifier in Row
Use this configuration when each row of the result set contains information needed to identify each stream. In the simplest case, there could be one column for the identifier, one column for the timestamp, and one column for the value. However, result sets could contain multiple timestamp columns and multiple value columns.
This configuration requires that the user specify the selectColumn and selectValue properties.
Example Data:
|
Asset |
Temperature |
Pressure |
Volume |
SampleTime |
|---|---|---|---|---|
|
Tank1 |
25 |
100 |
50.6 |
11/11/2020 3:56:00 AM |
|
Tank2 |
26.3 |
100.2 |
50.7 |
11/11/2020 3:56:00 AM |
|
Tank3 |
26.4 |
100.1 |
50.5 |
11/11/2020 3:56:00 AM |
|
Tank2 |
26.5 |
100 |
50.4 |
11/11/2020 3:46:00 AM |
|
Tank3 |
26.6 |
99.9 |
50.3 |
11/11/2020 3:46:00 AM |
|
Tank1 |
26.7 |
99.8 |
50.2 |
11/11/2020 3:46:00 AM |
Tank1.Temperature
[
{
"streamId": "Tank1.Temperature",
"valueColumn": "Temperature",
"indexColumn": "SampleTime",
"selectColumn": "Asset",
"selectValue": "Tank1",
"scheduleId": "1min",
"queryId": "Tanks",
"selected": true
}
]
Tank2.Temperature
[
{
"streamId": "Tank2.Temperature",
"valueColumn": "Temperature",
"indexColumn": "SampleTime",
"selectColumn": "Asset",
"selectValue": "Tank2",
"scheduleId": "1min",
"queryId": "Tanks",
"selected": true
}
]