SQL Statment is "-" #478
-
| Hello, But since the limit 1 it will only return the first value, sometimes it returns "-" instead of the actual SQL statement. The SQL statement is in the 2nd or 3rd result of the query. There should be a filter to remove these '-', like so: Just need to add: and tag_data->>'query' <> '-' | 
Beta Was this translation helpful? Give feedback.
Replies: 14 comments
-
| Thanks for your request. Would you please provide us with the screenshot and software participated (Influx vs Postgres, Grafana version, etc.) | 
Beta Was this translation helpful? Give feedback.
-
| Grafana: version 6.7.4 | 
Beta Was this translation helpful? Give feedback.
-
| for the "-" in my case I got this when the get_statement does not have the right to get the actual query ( as its done by another user per exemple ) | 
Beta Was this translation helpful? Give feedback.
-
| But for me, it is due to limit 1, the first result is "-", the second result has the actual query. | 
Beta Was this translation helpful? Give feedback.
-
| @dcop7 are the queryid and users identical for all results? | 
Beta Was this translation helpful? Give feedback.
-
| It is the same query ID, one has "-", another has the full query. | 
Beta Was this translation helpful? Give feedback.
-
| When I click in the Query ID, it opens the Single query details. | 
Beta Was this translation helpful? Give feedback.
-
| Ok, that doesn't help me understand this issue. Again, please show the username or userid along side the list of queryids. | 
Beta Was this translation helpful? Give feedback.
-
| The rows 1 and 3 has the same query ID, but in the first one the query is "-" and the row 3 it has the full statment. | 
Beta Was this translation helpful? Give feedback.
-
| ok, thank you for confirming that... | 
Beta Was this translation helpful? Give feedback.
-
| Yes, I think so. What do you need? | 
Beta Was this translation helpful? Give feedback.
-
| I think there are a few possible cases: 
 So you'd have to do a little digging based on timestamps of the entries, check where exactly those entries are being sent from etc. Sorry that I can't help more specifically right now. All in all I do believe that this is a configuration issue and not a general one. Best regards | 
Beta Was this translation helpful? Give feedback.
-
| @dcop7 What metrics config are you using? Can it be that "stat_statements_no_query_text" and normal "stat_statements" metrics both are activated? That would explain it... | 
Beta Was this translation helpful? Give feedback.
-
| Hello @kmoppel-cognite, | 
Beta Was this translation helpful? Give feedback.


@dcop7 What metrics config are you using? Can it be that "stat_statements_no_query_text" and normal "stat_statements" metrics both are activated? That would explain it...