Open dtaylor293 opened 2 years ago
Hi,
thanks for this. I believe this has already been raised but cannot find it so going to keep yours open. I also believe that this has already been fixed in version 5.0 - although 5.0 is not yet released.
Loving the Grafana dashboard by the way :)
Thank you :)
Steps to reproduce the behavior: Browse to the Long Queries dashboard in Grafana. Within the Long Queries Grafana dashboard, the Query Text panel is not displaying the SQL text.![image](https://user-images.githubusercontent.com/67872902/144281531-440734c7-572e-46b0-b158-2f9fe7306372.png)
If you make the dashboard editable and view the panel query, it references an invalid column called statement on [dbo].[vw_sqlwatch_report_fact_xes_long_queries];
SELECT time=getdate(),sql_text, statement FROM [dbo].[vw_sqlwatch_report_fact_xes_long_queries] where [sql_instance] = '$sql_instance' AND $__timeFilter(event_time) AND long_query_id = isnull('$LongQueryId',-1)
To resolve, the query can be amended to remove the statement column; SELECT time=getdate(),sql_text FROM [dbo].[vw_sqlwatch_report_fact_xes_long_queries] where [sql_instance] = '$sql_instance' AND $__timeFilter(event_time) AND long_query_id = isnull('$LongQueryId',-1)
SQL Server (please complete the following information):
SQLWATCH version
Loving the Grafana dashboard by the way :)