azure-data-explorer-datasource icon indicating copy to clipboard operation
azure-data-explorer-datasource copied to clipboard

Template variables in Builder

Open MFourZero opened this issue 1 year ago • 1 comments

What happened: When using the query builder in the ADX plugin, the template variable of the dashboard cannot be used (like mentioned in the note) because it parses them as a unique string and not as a list of values.

What you expected to happen: Use the template variable also in the builder for a better user experience for users who are not confident with KQL.

How to reproduce it (as minimally and precisely as possible):

  1. Create a template variable for the dashboard
  2. Populate it with some values by which you want to filter in the query
  3. In the ADX Plugin Builder try to use a filter function based on that variable
  4. Run the query

You can see that the clause is translated like | where origin in ('$origin') (adding single quotes around the variable) instead of | where origin in ($origin).

I don't see this as a feature request (even if expected by the documentation) but as a bug, because the Builder itself is the feature for the plugin but it is not working as expected.

Screenshots

Anything else we need to know?:

Environment:

  • Grafana version: 10.3.4
  • Plugin version: 4.9.0
  • OS Grafana is installed on: Azure Managed Grafana
  • User OS & Browser:
  • Others:

MFourZero avatar Mar 20 '24 15:03 MFourZero

Hi @MFourZero, I can confirm I've replicated this. Thank you for the report, we'll add this to our backlog 😊

aangelisc avatar Mar 21 '24 12:03 aangelisc