Required role: write or higher.
Subscribe to a stream of updates from a SQL view or table.
The pipeline responds with a continuous stream of changes to the specified
table or view. The stream is configurable two ways:
-
Simple configuration of the format may be provided using query parameters.
Specify backpressure to specify behavior when the HTTP client cannot
keep up. Use format to specify csv or json output. For json
output format, update_format and json_flavor may be provided (with the
same possible values as in JSON format configuration for connectors).
-
Comprehensive configuration may be provided by providing a connector
configuration as a JSON body. In this case, no query parameters are
allowed.
Updates are split into Chunks.
The pipeline continues sending updates until the client closes the
connection or the pipeline is stopped.
| Path Parameters |
|---|
pipeline_name string — REQUIRED |
table_name string — REQUIREDSQL table name. Unquoted SQL names have to be capitalized. Quoted SQL names have to exactly match the case from the SQL program. |
| Query Parameters |
|---|
format string — REQUIREDOutput data format, either 'csv' or 'json'. |
send_snapshot booleanSet to true to send a full snapshot of a materialized view before streaming incremental updates. The default is false. Works on a paused pipeline: the snapshot is delivered from the latest cached view state without requiring the pipeline to be running. |
array booleanSet to true to group updates in this stream into JSON arrays (used in conjunction with format=json). The default value is false |
backpressure booleanApply backpressure on the pipeline when the HTTP client cannot receive data fast enough.
When this flag is set to false (the default), the HTTP connector drops data chunks if the client is not keeping up with its output. This prevents a slow HTTP client from slowing down the entire pipeline.
When the flag is set to true, the connector waits for the client to receive each chunk and blocks the pipeline if the client cannot keep up. |
| Responses |
|---|
200
Connection to the endpoint successfully established. The body of the response contains a stream of data chunks. | Schema — OPTIONAL |
|---|
bin_data binary — OPTIONALBase64 encoded binary payload, e.g., bincode. | json_data object — OPTIONAL | processed_steps int64 — OPTIONALThe 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. | sequence_number int64 | snapshot booleantrue when this chunk is part of the initial snapshot delivered in
send_snapshot mode; false for incremental delta updates.
| text_data string — OPTIONAL |
|
| Schema — OPTIONAL |
|---|
detailsDetailed error metadata.
The contents of this field is determined by error_code. | error_code stringError code is a string that specifies this error type. | message stringHuman-readable error message. |
|
404
Pipeline and/or table/view with that name does not exist | Schema — OPTIONAL |
|---|
detailsDetailed error metadata.
The contents of this field is determined by error_code. | error_code stringError code is a string that specifies this error type. | message stringHuman-readable error message. |
|
| Schema — OPTIONAL |
|---|
detailsDetailed error metadata.
The contents of this field is determined by error_code. | error_code stringError code is a string that specifies this error type. | message stringHuman-readable error message. |
|
| Schema — OPTIONAL |
|---|
detailsDetailed error metadata.
The contents of this field is determined by error_code. | error_code stringError code is a string that specifies this error type. | message stringHuman-readable error message. |
|