I have two queries, fetching departure and return; I want the difference from it.
I do an outerjoin of the two resultsets, but the timestamp are repeated, how to resolve this?
I have two queries, fetching departure and return; I want the difference from it.
I do an outerjoin of the two resultsets, but the timestamp are repeated, how to resolve this?
Hello and welcome to the forum, @jandekock
Can you inspect that panel and view your raw, unformatted data? Or the raw response and query? I’m wondering if those timestamps are actually different on a sub-second level. Like this panel:
https://play.grafana.org/d/wC-4YLa7k/mja-checking-timestamps-for-subsonic-difference?orgId=1
hmmm, this is interesting indeed…
Can you share your query? And maybe one raw response from each of those two queries, where the timestamps appear the same? I ask because I’d like to try and reproduce this…
query 1:
{
“request”: {
“url”: “api/datasources/proxy/1”,
“method”: “POST”,
“data”: {
“query”: “{\n data(variable: “SM_GratesLeft_AV_DiffPressOilCyl1”, from: “1644856259515”, to:“1644856266437”, site:“varmevarden” , interval_text:“1s”) {\n time\n value\n }\n }”
},
“hideFromInspector”: false
},
“response”: {
“data”: {
“data”: [
{
“time”: “2022-02-14 17:31:00”,
“value”: -48.376007080078125
},
{
“time”: “2022-02-14 17:31:05”,
“value”: -50.11212158203125
}
]
}
}
}
query 2:
{
“request”: {
“url”: “api/datasources/proxy/1”,
“method”: “POST”,
“data”: {
“query”: “{\n data(variable: “DB057_Grates_AV_PosCyl1”, from: “1644856259515”, to:“1644856266437”,site:“varmevarden”, interval_text:“1s” ) {\n time\n value\n }\n }”
},
“hideFromInspector”: false
},
“response”: {
“data”: {
“data”: [
{
“time”: “2022-02-14 17:31:00”,
“value”: 10.597108840942383
},
{
“time”: “2022-02-14 17:31:01”,
“value”: 9.666875839233398
},
{
“time”: “2022-02-14 17:31:02”,
“value”: 8.73664379119873
},
{
“time”: “2022-02-14 17:31:03”,
“value”: 7.818981647491455
},
{
“time”: “2022-02-14 17:31:04”,
“value”: 7.140163421630859
},
{
“time”: “2022-02-14 17:31:05”,
“value”: 6.247642993927002
},
{
“time”: “2022-02-14 17:31:06”,
“value”: 5.3551225662231445
}
]
}
}
}