Write a Spray server that speaks Druid
Opened this issue · 5 comments
So you would POST this:
{
"queryType": "timeseries",
"dataSource": "name_of_dynamodb_table_for_now",
"granularity": "day",
"intervals": [ "2012-01-01T00:00:00.000/2012-01-03T00:00:00.000" ]
}
And you would get back:
[
{
"timestamp": "2012-01-01T00:00:00.000Z",
"result": { "Green": 23, "Red": 12, "Blue": 14 }
},
{
"timestamp": "2012-01-02T00:00:00.000Z",
"result": { "Purple": 17, "Red": 120, "Yellow": 4 }
}
]
Initially support these Druid granularities:
- day
- hour
- minute
This should go into 3-query-engines/scala-query-engine
[
{
"timestamp":"2015-06-05T12:56:00.000",
"result":[{"Green":"215"},{"Blue":"2432"},{"Red":"213"},{"Yellow":"2123"}]
},{
"timestamp":"2015-06-05T12:55:00.000",
"result":[{"Yellow":"333"},{"Blue":"350"},{"Green":"250"},{"Red":"222"}]
},{
"timestamp":"2015-06-05T12:54:00.000",
"result":[{"Yellow":"123"},{"Green":"15"},{"Blue":"432"},{"Red":"13"}]
}
]
Counts should be numeric not strings...
On 21 Jul 2015 7:30 pm, "Vincent Ohprecio" notifications@github.com wrote:
[
{
"timestamp":"2015-06-05T12:56:00.000",
"result":[{"Green":"215"},{"Blue":"2432"},{"Red":"213"},{"Yellow":"2123"}]
},{
"timestamp":"2015-06-05T12:55:00.000",
"result":[{"Yellow":"333"},{"Blue":"350"},{"Green":"250"},{"Red":"222"}]
},{
"timestamp":"2015-06-05T12:54:00.000",
"result":[{"Yellow":"123"},{"Green":"15"},{"Blue":"432"},{"Red":"13"}]
}
]—
Reply to this email directly or view it on GitHub
#1 (comment).
Implementation of the 4 mandatory fields http://druid.io/docs/latest/querying/timeseriesquery.html
With assumptions of granularity day
, hour
, day
as in http://druid.io/docs/latest/querying/granularities.html