This is an automated email from the ASF dual-hosted git repository.

maytasm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new a31d99f  update docs with X-Druid-SQL-Query-Id (#11761)
a31d99f is described below

commit a31d99fb373cc6e7aad1abd79831b551e3fcdfde
Author: Victoria Lim <[email protected]>
AuthorDate: Tue Oct 5 10:15:05 2021 -0700

    update docs with X-Druid-SQL-Query-Id (#11761)
    
    * update docs with X-Druid-SQL-Query-Id
    
    * review comments
    
    * update header description
    
    * Update docs/querying/sql.md
    
    Co-authored-by: Charles Smith <[email protected]>
    
    * Update docs/querying/sql.md
    
    Co-authored-by: Charles Smith <[email protected]>
    
    Co-authored-by: Charles Smith <[email protected]>
---
 docs/querying/sql.md | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/docs/querying/sql.md b/docs/querying/sql.md
index d6e0bd4..d81bffa 100644
--- a/docs/querying/sql.md
+++ b/docs/querying/sql.md
@@ -871,13 +871,13 @@ Submit your query as the value of a "query" field in the 
JSON object within the
 {"query" : "SELECT COUNT(*) FROM data_source WHERE foo = 'bar'"}
 ```
 
-##### Request
+##### Request body
       
 |Property|Description|Default|
 |--------|----|-----------|
 |`query`|SQL query string.| none (required)|
 |`resultFormat`|Format of query results. See [Responses](#responses) for 
details.|`"object"`|
-|`header`|Whether or not to include a header. See [Responses] for 
details.|`false`|
+|`header`|Whether or not to include a header row for the query result. See 
[Responses](#responses) for details.|`false`|
 |`context`|JSON object containing [connection context 
parameters](#connection-context).|`{}` (empty)|
 |`parameters`|List of query parameters for parameterized queries. Each 
parameter in the list should be a JSON object like `{"type": "VARCHAR", 
"value": "foo"}`. The type should be a SQL type; see [Data types](#data-types) 
for a list of supported SQL types.|`[]` (empty)|
 
@@ -949,10 +949,14 @@ You can additionally request a header by setting "header" 
to true in your reques
 }
 ```
 
-In this case, the first result returned will be a header. For the `csv`, 
`array`, and `arrayLines` formats, the header
+In this case, the first result of the response body is the header row. For the 
`csv`, `array`, and `arrayLines` formats, the header
 will be a list of column names. For the `object` and `objectLines` formats, 
the header will be an object where the
 keys are column names, and the values are null.
 
+Druid returns the SQL query identifier in the `X-Druid-SQL-Query-Id` HTTP 
header.
+This query id will be assigned the value of `sqlQueryId` from the [connection 
context parameters](#connection-context)
+if specified, else Druid will generate a SQL query id for you.
+
 Errors that occur before the response body is sent will be reported in JSON, 
with an HTTP 500 status code, in the
 same format as [native Druid query 
errors](../querying/querying.md#query-errors). If an error occurs while the 
response body is
 being sent, at that point it is too late to change the HTTP status code or 
report a JSON error, so the response will

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

Reply via email to