mirror of
https://github.com/apache/druid.git
synced 2025-02-17 07:25:02 +00:00
Examples for the cassandra storage.
This commit is contained in:
parent
8e8736291f
commit
17835e6e08
1
examples/cassandra/client.sh
Executable file
1
examples/cassandra/client.sh
Executable file
@ -0,0 +1 @@
|
|||||||
|
curl -sX POST "http://localhost:7070/druid/v2/?pretty=true" -H 'content-type: application/json' -d @query
|
19
examples/cassandra/query
Normal file
19
examples/cassandra/query
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"queryType": "groupBy",
|
||||||
|
"dataSource": "randSeq",
|
||||||
|
"granularity": "all",
|
||||||
|
"dimensions": [],
|
||||||
|
"aggregations":[
|
||||||
|
{ "type": "count", "name": "rows"},
|
||||||
|
{ "type": "doubleSum", "fieldName": "events", "name": "e"},
|
||||||
|
{ "type": "doubleSum", "fieldName": "outColumn", "name": "randomNumberSum"}
|
||||||
|
],
|
||||||
|
"postAggregations":[
|
||||||
|
{ "type":"arithmetic",
|
||||||
|
"name":"avg_random",
|
||||||
|
"fn":"/",
|
||||||
|
"fields":[ {"type":"fieldAccess","name":"randomNumberSum","fieldName":"randomNumberSum"},
|
||||||
|
{"type":"fieldAccess","name":"rows","fieldName":"rows"} ]}
|
||||||
|
],
|
||||||
|
"intervals":["2012-10-01T00:00/2020-01-01T00"]
|
||||||
|
}
|
11
examples/cassandra/query2
Normal file
11
examples/cassandra/query2
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"queryType": "groupBy",
|
||||||
|
"dataSource": "appevents",
|
||||||
|
"granularity": "all",
|
||||||
|
"dimensions": ["appid", "event"],
|
||||||
|
"aggregations":[
|
||||||
|
{"type":"count", "name":"eventcount"},
|
||||||
|
{"type":"doubleSum", "fieldName":"events", "name":"eventssum"}
|
||||||
|
],
|
||||||
|
"intervals":["2012-10-01T00:00/2020-01-01T00"]
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user