Data selection configuration
- Last UpdatedSep 25, 2025
- 4 minute read
After configuring the data source, create a data selection configuration file to specify the data for the adapter instance to collect from the data source.
When you add a data source, the adapter browses the server address space and exports the available variables into a file for data selection. If RootNodeIds are specified in the data source configuration, only those nodeIds are browsed. Data is collected automatically based upon user demands. data from variables is read through subscriptions (unsolicited reads).
You can either have the data selection configuration file generated for you or you can create it manually yourself.
Configure data selection using a generated file
A default data selection file will be created if there is no data selection configuration, but a valid data source exists.
Note: To avoid resource-intensive browse operations, AVEVA recommends that you manually create a data selection file instead of generating the default data selection file.
To generate the default data selection file and use it to configure data selection:
-
Add an adapter instance with a unique ComponentId either manually or during the installation.
-
Configure a valid data source.
Once you complete these steps, a default data selection configuration file is generated in the configuration directory with the file name based on the ComponentId.
The following are example locations of the file created using the adapter instance created during installation, which is OpcUa1:
Windows: %programdata%\OSIsoft\EdgeDataStore\Configuration\OpcUa1DataSelection.json.json
Linux: /usr/share/OSIsoft/EdgeDataStore/Configuration/OpcUa1DataSelection.json.json
-
Copy the file to a different directory and open it using any text editor.
It will look similar to the following example:
[
{
"Selected": false,
"Name": "Cold Side Inlet Temperature",
"NodeId": "ns=2;s=Line1.HeatExchanger1001.ColdSideInletTemperature",
"StreamId": null
},
{
"Selected": false,
"Name": "Cold Side Outlet Temperature",
"NodeId": "ns=2;s=Line1.HeatExchanger1001.ColdSideOutletTemperature",
"StreamId": null
}
]
-
To ingress a stream to , change the value of the Selected key from false to true. All streams in the auto generated data selection file are initially set to false.
-
Save the file.
-
Run the following command or EdgeCmd utility from the directory where the file is located, updating the file name and destination in the script if needed:
curl -d "@OpcUa1DataSelection.json" -H "Content-Type: application/json" -X PUT http://localhost:5590/api/v1/configuration/OpcUa1/Dataselection
edgecmd set dataSelection -cid OpcUa1 -file OpcUa1DataSelection.json
Configure data selection by manually creating the file
Note: data selection configurations cannot be modified manually. Use the endpoints to add or edit the configuration.
To configure the data selection:
-
Using any text editor, create a file that contains an data selection in form.
-
Update the parameters as needed.
-
Save the file to the device with installed with the name OpcUa1DataSelection.json.
-
Use any tool capable of making requests to execute a command with the contents of that file to the following endpoint: http://localhost:<port_number>/api/v1/configuration/<EDS adapterId>/DataSelection/
Definition: The POST method is used to create new resources.
The following examples show the request using and EdgeCmd utility, which must be run from the same directory where the file is located, and uses the adapter instance created during installation, which is OpcUa1:
curl -d "@OpcUa1DataSelection.json" -H "Content-Type: application/json" -X PUT http://localhost:5590/api/v1/configuration/OpcUa1/Dataselection
edgecmd set dataSelection -cid OpcUa1 -file OpcUa1DataSelection.json
Parameters for data selection
The following parameters can be used to configure data selection.
|
Parameter |
Required |
Type |
Nullable |
Description |
|---|---|---|---|---|
|
Selected |
Optional |
Boolean |
No |
Use this field to select a measurement to be collected. To select an item, set to true. To remove an item and not collect its data, leave the field empty or set to false. If not configured, the default value is false. |
|
Name |
Required |
string |
Yes |
The friendly name of the data item collected from the data source. The field is populated with the DisplayName value from the server when the data selection configuration is populated by the adapter. |
|
NodeId |
Required |
string |
Yes |
The NodeId of the variable. |
|
StreamID |
Optional |
string |
Yes |
The custom stream ID used to create the streams. If not specified, the adapter will generate a default stream ID based on the measurement configuration. A properly configured custom stream ID follows these rules:
|
OPC UA data selection example
The following is an example of valid data selection configuration:
[
{
"Selected": true,
"Name": "Random1",
"NodeId": "ns=5;s=Random1",
"StreamId": "CustomStreamName"
},
{
"Selected": false,
"Name": "Sawtooth1",
"NodeId": "ns=5;s=Sawtooth1",
"StreamId": null
},
{
"Selected": true,
"Name": "Sinusoid1",
"NodeId": "ns=5;s=Sinusoid1",
"StreamId": null
}
]