Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template variables in Builder #823

Open
MFourZero opened this issue Mar 20, 2024 · 1 comment · May be fixed by #855
Open

Template variables in Builder #823

MFourZero opened this issue Mar 20, 2024 · 1 comment · May be fixed by #855

Comments

@MFourZero
Copy link

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 MFourZero added datasource/ADX type/bug Something isn't working labels Mar 20, 2024
@aangelisc
Copy link
Contributor

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

@aangelisc aangelisc linked a pull request Apr 11, 2024 that will close this issue
@aangelisc aangelisc self-assigned this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

3 participants