mirror of https://github.com/apache/druid.git
Add inline native query example to tutorial (#11642)
* Add inline native query example to tutorial Minor change to the tutorial that adds an example of a native HTTP query request body, and adds a link to the more detailed "native query over HTTP" documentation. * cleanup * Apply suggestions from code review. Co-authored-by: sthetland <steve.hetland@imply.io> Co-authored-by: sthetland <steve.hetland@imply.io>
This commit is contained in:
parent
b1de56a3be
commit
0a9a908031
|
@ -216,7 +216,13 @@ Retrieved 10 rows in 0.06s.
|
||||||
### Query SQL over HTTP
|
### Query SQL over HTTP
|
||||||
|
|
||||||
|
|
||||||
You can submit queries directly to the Druid Broker over HTTP.
|
You can submit native queries [directly to the Druid Broker over HTTP](../querying/sql.md#http-post). The request body should be a JSON object, with the value for the key `query` containing text of the query:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"query": "SELECT page, COUNT(*) AS Edits FROM wikipedia WHERE \"__time\" BETWEEN TIMESTAMP '2015-09-12 00:00:00' AND TIMESTAMP '2015-09-13 00:00:00' GROUP BY page ORDER BY Edits DESC LIMIT 10"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
The tutorial package includes an example file that contains the SQL query shown above at `quickstart/tutorial/wikipedia-top-pages-sql.json`. Let's submit that query to the Druid Broker:
|
The tutorial package includes an example file that contains the SQL query shown above at `quickstart/tutorial/wikipedia-top-pages-sql.json`. Let's submit that query to the Druid Broker:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue