Query Variable: Unable to parse SQL LENGTH function

  • What Grafana version and what operating system are you using?

    • v8.0.0 (41f0542c1e)
  • What are you trying to achieve?

    • Assign value to dashboard variable by getting LENGTH of value of another variable
  • How are you trying to achieve it?

    • As a query variable. Following query:
    SELECT LENGTH(${location_ids:sqlstring});
    
    // even trying the following gives None as value
    SELECT LENGTH('grafana');
    
  • What happened?

    • This query was working just fine until I upgraded to Grafana 8.0
  • What did you expect to happen?

    • Work as expected
  • Can you copy/paste the configuration(s) that you are having problems with?

    • No
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

    • No. All of my errors originate from not being able to parse LENGTH of an already existing dashboard variable
  • Did you follow any online instructions? If so, what is the URL?

    • Not applicable as Dashboard was working just fine previously under Grafana 7.X

Hi @pupdogg

Have you tried toggling table view in the query editor? The SQL datasources changes how they render data frames in g8, so some queries will need to be adjusted.

here is a note about those changes:

This topic was automatically closed after 365 days. New replies are no longer allowed.