Write data
- Last UpdatedSep 25, 2025
- 2 minute read
The Sequential Data Store () s provide programmatic access to write data to . All writes rely on a stream's key or primary index. The primary index determines the order of events in the stream. Secondary indexes are updated, but they do not contribute to the request. All references to indexes are to the primary index.
When working in , convenient Client libraries are available. The ISdsDataService interface, accessed using the SdsService.GetDataService() helper, defines the available functions.
Definition: The .NET Framework is a proprietary software framework developed by Microsoft that runs primarily on Windows.
Single stream writes
The following methods support writing a single or multiple values:
-
Insert Values inserts a collection of events.
-
Patch Values updates specific fields for a collection of events.
-
Replace Values replaces a collection of events.
-
Remove Values deletes the events based on the request parameters.
-
Update Values add or replaces a collection of events.
Request body format
With the exception of Remove Values, all single stream write calls require a request body containing the events to insert or modify. The events must be formatted as a serialized array of the stream's type. arrays are comma-delimited lists of a type enclosed within square brackets. The following code shows a list of three WaveData events that are properly formatted for insertion.
For samples, see the CONNECT data services code samples in (https://github.com/AVEVA/AVEVA-Samples-CloudOperations/).
GitHub
[
{
"Order":2,
"Tau":0.25722883666666846,
"Radians":1.6162164471269089,
"Sin":1.9979373673043652,
"Cos":-0.090809010174665111,
"Tan":-44.003064529862513,
"Sinh":4.8353589272389,
"Cosh":5.2326566823391856,
"Tanh":1.8481468289554672
},
{
"Order":4,
"Tau":0.25724560000002383,
"Radians":1.6163217742567466,
"Sin":1.9979277915696148,
"Cos":-0.091019446679060964,
"Tan":-43.901119254534827,
"Sinh":4.8359100947709592,
"Cosh":5.233166005842703,
"Tanh":1.8481776000882766
},
{
"Order":6,
"Tau":0.25724560000002383,
"Radians":1.6163217742567466,
"Sin":1.9979277915696148,
"Cos":-0.091019446679060964,
"Tan":-43.901119254534827,
"Sinh":4.8359100947709592,
"Cosh":5.233166005842703,
"Tanh":1.8481776000882766
}
]
You can serialize your data using one of many available serializers available at Introducing JSON.
Indexes
writes rely on the primary index for positioning within streams and locating existing events. Most writes use the index as specified by the value; however, for deletes, indexes are specified as strings in the , or, when using the Client Libraries, the index may be passed as-is to methods that take the index type as a generic argument. For more details about working with indexes, see Indexes.
Definition: The DELETE method is used to remove data from a database.
To specify compound indexes in the , specify each field that composes the index, in the specified order, separated by the pipe character, |.