-
Notifications
You must be signed in to change notification settings - Fork 34
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
Time filter within a variable query does't work #546
Comments
It doesn't look like we currently support time macros in template variable queries. @aangelisc please correct me if I'm wrong. |
I also don’t think it is possible to reference other variables for even further filtering. for example, if I have a “customer” variable and an “order” variable, I would want that when I filter for customer A, the orders variable will only show values for customer A. should I open a different issue for this? |
The
The problem may be that the column I also recommend upgrading to the latest version of the plugin to get rid of possible bugs. |
@andresmgot it doesn't work. I added this where clause to the query of the variable:
and the query is being sent with this line as is. |
@shaharmor that indeed should not happen. I cannot reproduce it with the latest version of the plugin (and Grafana): Can you check if upgrading solves your issue? |
@andresmgot in a panel it works, but not in a variable query |
ah, sorry, completely misread the description you are right @bossinc we don't support time variables in variables queries. This would be a new feature. We should refactor how template variables are written in the plugin. It's using the old As currently is, it's not sending a time range as part of the query so in the backend, the timeFilter macro is resolved but using |
I really think this would greatly improve the UX of using variables for filtering, as the values will only be the ones relevant and not all possible values |
Overally, the fix alone for this was a small effort, but did additional work to improve the feature, which would count the overall time spent here closer to a medium. |
What happened:
When trying to add a time filter to a query-based variable, the query fails.
Example query:
myTable
| where $__timeFilter(timestamp) // <-- This line makes the query fail
| take 10
| project columnName
What you expected to happen:
The query should use the timefilter when getting the data from ADX for the variable
How to reproduce it (as minimally and precisely as possible):
Screenshots
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: