- Activities
- Alarms
- Audit
- Buckets
- Clearance
- Commands
- COP-1
- Database
- Events
- File Transfer
- IAM
- Indexes
- Instances
- Links
- MDB Override
- MDB
- Packets
- Parameter Archive
- Parameter Lists
- Parameter Values
- Processing
- Queues
- Replication
- RocksDB
- Server
- Services
- Sessions
- Stream Archive
- Table
- Time Correlation
- Time
- Timeline
Yamcs Release Notes
Yamcs Server Manual
Source Code Documentation
Write RowsΒΆ
Imports a stream of rows
The table has to exist in order to load data into it.
As soon as the server detects an error with one of the written rows, it will forcefully close the connection and send back an early error message. The client should stop streaming and handle the error.
Note that the erratic condition causes the connection to be closed
even if the Keep-Alive
request header was enabled.
The error response is of type ExceptionMessage
and contains a
detail message of type WriteRowsExceptionDetail
that provides
the number of rows that were successfully written by the client.
The client can use this information to link the error message to a
row (i.e. the bad row is at position count + 1
of the stream).
One possible error could be that the table has defined a (primary) key and one of the loaded rows contains no value for one of the columns of the key.
The table load will overwrite any data existing in the table with the same key as the imported row.
The table load will not update the histograms so a histogram rebuild is required after the load.
Warning
This method uses client-streaming.
URI Template
POST /api/archive/{instance}/tables/{table}:writeRows
{instance}
Yamcs instance name.
{table}
Table name.
Request Body
interface Row {
//the column info is only present for new columns in a stream of Row messages
columns: ColumnInfo[];
cells: Cell[];
}
Response Type
interface WriteRowsResponse {
// The number of rows that were written
count: number;
}
Related Types
interface ColumnInfo {
id: number;
name: string;
type: string;
// The name of the class implementing the proto object if dataType is PROTOBUF
protoClass: string;
}
interface Cell {
columnId: number;
data: string; // Base64
}