grafadruid/druid-grafana

Using time variables in druid query

Closed this issue · 0 comments

Hi!

Sorry for stupid question, I'm new to Grafana and Druid. I try to set time variables in JSON-query. If I specify time values, I get a response from Durid:

...
{
    "type": "greaterThan",
    "aggregation": "date",
    "value": 1656622800000
},
{
    "aggregation": "date",
    "type": "lessThan",
    "value": 1659301200000
}
...

But if I specify global time variables:

...
{
"type": "greaterThan",
"aggregation": "date",
"value": "${__from}"
},
{
"aggregation": "date",
"type": "lessThan",
"value": "${__to}"
}
...

I get an error: json: cannot unmarshal string into Go struct field GreaterThan.value of type float64
What am I doing wrong? And should it work like that?