pub struct Chunk {
pub sequence_number: u64,
pub snapshot: bool,
pub processed_steps: Option<Step>,
pub bin_data: Option<Vec<u8>>,
pub text_data: Option<String>,
pub json_data: Option<Value>,
}Expand description
A set of updates to a SQL table or view.
The sequence_number field stores the offset of the chunk relative to the
start of the stream and can be used to implement reliable delivery.
The payload is stored in the bin_data, text_data, or json_data field
depending on the data format used. A chunk without a payload marks the
end of a step’s output, when it carries processed_steps, or is a
keep-alive.
Fields§
§sequence_number: u64§snapshot: booltrue when this chunk is part of the initial snapshot delivered in
send_snapshot mode; false for incremental delta updates.
processed_steps: Option<Step>The number of steps whose output precedes this chunk, this step
included. Some only on the empty chunk that follows a step’s output,
so a chunk with processed_steps carries no bin_data, text_data
or json_data. The output of a record that the pipeline ingested in
step n has been delivered once processed_steps > n. The
/completion_status endpoint reports the step that a completion
token waits for in the same unit, so a client that has received a
chunk with processed_steps at or above that step is guaranteed to
have received every update for the token.
bin_data: Option<Vec<u8>>Base64 encoded binary payload, e.g., bincode.
text_data: Option<String>Text payload, e.g., CSV.
json_data: Option<Value>JSON payload.