Load Table Data
Load data into a table:
Use HTTP header (antyhing else is not supported):
The data is a stream of Rows, each Row being composed of a list of Cells. Each Row is preceded by its size in bytes varint encoded.
Each row has an optional associated list of ColumnInfo messages that define the table columns conainted in the row. The
The table has to exist in order to load data into it.
Chuncked data encoding can be used to send a large number of rows without knowing the total size in advance.
Response can be PROTOBUF or JSON depending on the “Accept” header of the request.
Status: 200 OK
Status: 400 BAD_REQUEST
If there is an error during the load, the HTTP status will be 4xy or 5xy and the msg will contain more information about the error. 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.
As the data is streamed to the server, if there is an error, there would have been certanly more data sent after the bad row, so the error is not about the last row sent. The numRowsLoaded response parameter can be used to know how many rows have been successfully loaded (the bad row is the numRowsLoaded+1 in the stream).
Note that if the server detects an error, it will send back the error message and close the connection regardless of the Keep-Alive option in the request header.