Insert Data
Push data to a SQL table.
The client sends data encoded using the format specified in the ?format=
parameter as a body of the request. The contents of the data must match
the SQL table schema specified in table_name
The pipeline ingests data as it arrives without waiting for the end of the request. Successful HTTP response indicates that all data has been ingested successfully.
On success, returns a completion token that can be passed to the ‘/completion_status’ endpoint to check whether the pipeline has fully processed the data.
Authentication
| Scheme | Type | Details |
|---|---|---|
JSON web token (JWT) or API key | Bearer token | Authorization header · Use a JWT token obtained via an OAuth2/OIDC login workflow or an API key obtained via the `/v0/api-keys` endpoint. |
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
pipeline_name | string | Yes | Unique pipeline name |
table_name | string | Yes | SQL table name. Unquoted SQL names have to be capitalized. Quoted SQL names have to exactly match the case from the SQL program. |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
force | boolean | Yes | When `true`, push data to the pipeline even if the pipeline is paused. The default value is `false` |
format | string | Yes | Input data format, either `csv' or 'json'. |
array | boolean | No | Set to `true` if updates in this stream are packaged into JSON arrays (used in conjunction with `format=json`). The default values is `false`. |
update_format | object | No | JSON data change event format (used in conjunction with `format=json`). The default value is 'insert_delete'. |
Request body
Content type: text/plain
- string
Response
Data successfully delivered to the pipeline. The body of the response contains a completion token that can be passed to the '/completion_status' endpoint to check whether the pipeline has fully processed the data.
- objectResponse to a completion token creation request.
tokenstringrequiredCompletion token. An opaque string associated with the current position in the input stream generated by an input connector. Pass this string to the `/completion_status` endpoint to check whether all inputs associated with the token have been fully processed by the pipeline.
curl -X POST '/v0/pipelines/{pipeline_name}/ingress/{table_name}?force=%3Cforce%3E&format=%3Cformat%3E&array=%3Carray%3E&update_format=%3Cupdate_format%3E' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Content-Type: text/plain' \
-d '"string"'