mirror of https://github.com/apache/druid.git
Documentation for query data sources
This commit is contained in:
parent
c88cb2af16
commit
8f39981fab
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
layout: doc_page
|
||||
---
|
||||
A data source is the Druid equivalent of a database table. However, a query can also masquerade as a data source, providing subquery-like functionality. Query data sources are currently only supported by [GroupBy](GroupByQuery.html) queries.
|
||||
|
||||
### Table Data Source
|
||||
The table data source the most common type. It's represented by a string, or by the full structure:
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "table",
|
||||
"name": <string_value>
|
||||
}
|
||||
```
|
||||
|
||||
### Query Data Source
|
||||
```json
|
||||
{
|
||||
"type": "query",
|
||||
"query": {
|
||||
"type": "groupBy",
|
||||
...
|
||||
}
|
||||
}
|
||||
```
|
|
@ -47,7 +47,7 @@ There are 9 main parts to a groupBy query:
|
|||
|property|description|required?|
|
||||
|--------|-----------|---------|
|
||||
|queryType|This String should always be "groupBy"; this is the first thing Druid looks at to figure out how to interpret the query|yes|
|
||||
|dataSource|A String defining the data source to query, very similar to a table in a relational database|yes|
|
||||
|dataSource|A String defining the data source to query, very similar to a table in a relational database, or a [DataSource](DataSource.html) structure.|yes|
|
||||
|dimensions|A JSON list of dimensions to do the groupBy over|yes|
|
||||
|orderBy|See [OrderBy](OrderBy.html).|no|
|
||||
|having|See [Having](Having.html).|no|
|
||||
|
|
Loading…
Reference in New Issue