TLDR Shashank is facing issues with an API call getting a bad response code. Hengfei indicated the query may be incorrect and suggested an upgrade. Prabhat showed typical stream page queries. The issue is unresolved.
your query looks like is not correct.
we don't support `sql:changes`
and can you try v0.5.1?
Yah but this what UI is sending.
I got the details by inspecting my browser.
Yep, maybe it is a bug of 0.5.0. can you try 0.5.1?
Can you pls help me with the MR which fixed this :pray:
Currently we can not perform upgrade.
ah, i never got this error before. so i am not sure which pr fixed this problem.
and which page you got this error?
i tested v0.5.0 metrics, there is no this error.
and i suggest upgrade to 0.5.1, The old version doesn't provide great support for metrics
and 0.5.1 has no break changes to 0.5.0
Atleast can you pls point me to file where payload constructions happens ?
This API call gets triggered by UI when I hit run query under streams.
cc: Prabhat
am not sure how you got this query: ```{ "query": { "sql": { "changes": [ { "range": { "startLineNumber": 1, "startColumn": 1, "endLineNumber": 1, "endColumn": 1 }, "rangeOffset": 0, "rangeLength": 0, "text": "SELECT * FROM \"apiserver_longrunning_requests\"" } ], "eol": "\r\n", "versionId": 2, "isUndoing": false, "isRedoing": false, "isFlush": true }, "start_time": 1691660627545000, "end_time": 1691661527545000, "from": 0, "size": 150, "sql_mode": "full" } }```
A typical query from stream page looks like: ```{ "query": { "sql": "SELECT * FROM \"apiserver_request_filter_duration_seconds_sum\"", "start_time": 1691786328940000, "end_time": 1691787228940000, "from": 0, "size": 150, "sql_mode": "full" } }```
or ```{ "query": { "sql": "SELECT * FROM \"apiserver_request_filter_duration_seconds_sum\" where filter='authorization'", "start_time": 1691786328940000, "end_time": 1691787228940000, "from": 0, "size": 150, "sql_mode": "full" } }```
can you share your query...
Shashank
Thu, 10 Aug 2023 10:24:29 UTCHi Team, I using openobserve(v0.5.0). I am getting this response code when I am trying to filter metric data under stream based on time. ```Request URL:
Request Method: POST
Status Code: 400```
Response:
```{
"code": 400,
"message": "invalid type: map, expected a string at line 1 column 16"
}```
Payload:
```{"query":{"sql":{"changes":[{"range":{"startLineNumber":1,"startColumn":1,"endLineNumber":1,"endColumn":1},"rangeOffset":0,"rangeLength":0,"text":"SELECT * FROM \"apiserver_longrunning_requests\""}],"eol":"\r\n","versionId":2,"isUndoing":false,"isRedoing":false,"isFlush":true},"start_time":1691660627545000,"end_time":1691661527545000,"from":0,"size":150,"sql_mode":"full"}}```
Can someone pls help me on this !!