vogievetsky commented on code in PR #12983:
URL: https://github.com/apache/druid/pull/12983#discussion_r958969870


##########
docs/multi-stage-query/msq-api.md:
##########
@@ -0,0 +1,1634 @@
+---
+id: api
+title: SQL-based ingestion APIs
+sidebar_label: API
+---
+
+> SQL-based ingestion using the multi-stage query task engine is our 
recommended solution starting in Druid 24.0. Alternative ingestion solutions, 
such as native batch and Hadoop-based ingestion systems, will still be 
supported. We recommend you read all [known issues](./msq-known-issues.md) and 
test the feature in a development environment before rolling it out in 
production. Using the multi-stage query task engine with `SELECT` statements 
that do not write to a datasource is experimental.
+
+The **Query** view in the Druid console provides the most stable experience 
for the multi-stage query task engine (MSQ task engine) and multi-stage query 
architecture. Use the UI if you do not need a programmatic interface.
+
+When using the API for the MSQ task engine, the action you want to take 
determines the endpoint you use:
+
+- `/druid/v2/sql/task` endpoint: Submit a query for ingestion.
+- `/druid/indexer/v1/task` endpoint: Interact with a query, including getting 
its status, getting its details, or canceling it. This page describes a few of 
the Overlord Task APIs that you can use with the MSQ task engine. For 
information about Druid APIs, see the [API reference for 
Druid](../operations/api-reference.md#tasks).
+
+## Submit a query
+
+You submit queries to the MSQ task engine using the `POST /druid/v2/sql/task/` 
endpoint.
+
+### Request
+
+Currently, the MSQ task engine ignores the provided values of `resultFormat`, 
`header`,
+`typesHeader`, and `sqlTypesHeader`. SQL SELECT queries always behave as if 
`resultFormat` is an array, `header` is
+true, `typesHeader` is true, and `sqlTypesHeader` is true.

Review Comment:
   I would change
   
   ```
   SQL SELECT queries always behave as if `resultFormat` is an array, `header` 
is
   true, `typesHeader` is true, and `sqlTypesHeader` is true.
   ```
   
   To
   
   ```
   SQL SELECT queries write out their results into the task report (in the 
`multiStageQuery.payload.results.results` key) formatted as if `resultFormat` 
is an `array`.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to