Open Boeller666 opened 1 year ago
Is anybody able to check if this is a bug or if I'm doing something wrong?
Hey @Boeller666, Sure thing, let's try to make this simpler. Can you provide a test database or csv I can use to test this? Can you please tell us more about the data types you are using there?
These are the data types:
and a csv is attached example-data.csv
Hey @Boeller666, Thanks for providing me data to reproduce this. I was able to see the error you mentioned. I suspect you only see this when a query returns no data right?
We will fix this soon anyways. Thanks for reporting.
Hmm, have to check if it only occurs if there is no data returned. Will tell you later!
Yes, seems it will not fail if data is returned. Is there any other PR, branch or whatever to link here that solves this issue?
@Boeller666 nope, this is not picked up yet. We had something similar in the core sql data sources recently https://github.com/grafana/grafana/pull/67844/files#diff-fb30141c4ef5bef3c02a17014449038daac2b593e7cc4e066fb3c35243a4e7dcL317 the cause of the issue is that we return the column names with null values and alerting doesn't consider this an empty dataframe. The fix we did for the sql data sources is to remove the columns if they are empty. It looks like a proper fix would be not to return the column names from upstream. From here https://github.com/grafana/grafana-plugin-sdk-go/blob/main/data/sqlutil/sql.go
( as this relates to the no-results case, this may be similar to https://github.com/grafana/grafana/issues/82306)
I tryed to create an alert from a query that already works in explore, even as table or time series:
When using this as a table I got:
When using this as a time series I got:
Maybe related to https://github.com/grafana/grafana/issues/48072 ?