Subscribe to View
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. Use
formatto specifycsvorjsonoutput and, forjsononly,arrayto specify whether to group updates into JSON arrays. Specifybackpressureto specify behavior when the HTTP client cannot keep up. -
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 — REQUIREDUnique pipeline name |
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'. |
array booleanSet to |
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 | |||||
|---|---|---|---|---|---|
200Connection to the endpoint successfully established. The body of the response contains a stream of data chunks.
| |||||
400
| |||||
404Pipeline and/or table/view with that name does not exist
| |||||
500
| |||||
503
|