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

Use parameter values in query title #4383

Open
arikfr opened this issue Nov 21, 2019 · 12 comments
Open

Use parameter values in query title #4383

arikfr opened this issue Nov 21, 2019 · 12 comments

Comments

@arikfr
Copy link
Member

arikfr commented Nov 21, 2019

Given a query with parameter {{x}} if the title has {{x}} in it, it will be replaced with the parameter value. If no value is provided, the parameter name will be shown (?).

@susodapop
Copy link
Contributor

I wanted to clarify: is this for the Query Title shown on a dashboard? Or for the query Name shown in the list view and when searching for queries while making an Alert, for example?

@JivanRoquet
Copy link

I second @arikfr point here. Without this capability, parameters are basically useless in practice.

@susodapop if your in-progress React implementation leaves you any spare time to work on stuff that delivers actual value to your users (aside from deleting users' posts in your Discourse support channel), this one is a must-have.

Or, as an alternative, at least there needs to be a way to change a dashboard widget title. Without at least one of these solutions, we can't use parameters in queries that are intended for a dashboard (because the title won't be able to reflect them).

@arikfr
Copy link
Member Author

arikfr commented Mar 29, 2020

We always try to balance between long term value projects like React migration or the Python 3 support and user facing features. While we would love to do only the later, for the long term maintainability of the project, we have to invest in less user facing projects too.

While this specific feature is very important to your use case, it's actually not that common of a request and this is why it wasn't implemented so far.

If you're interested to submit a pull request implementing this, let me know, and we can discuss possible implementation.

Lastly, I don't see any deleted posts in Discourse: what are you referring to?

@JivanRoquet
Copy link

JivanRoquet commented Mar 29, 2020

Hello @arikfr thanks for the quick answer. I was saying the above because of a number of reasons:

  • on the Discourse platform, I've seen quite some requests that one would consider "basic" for a data visualisation tool (e.g. horizontal bar charts) that have been asked for one or two years without delivery
  • the "we are migrating to React" was used as a justification for not having delivered on these features two years later
  • by using the software, I can actually tell that the visualisation part is quite lacking some basic fundamentals and one would almost have an easier time directly importing the Plotly library in a Python/JS environment tied with an SQL console rather than going through the hoops and bumps of setting a dashboard in Redash (and deal with its limitations)

Keep it up, but in my case I'm only using Redash because I don't have a choice. As soon as I get an access to the underlying db, I'll use a different solution. Software is just too limited as of today (one can't even customise the title of a widget, c'mon... I'm not even talking about the dashboard "text box" widget which is closer to a joke than to a feature)

@cloudjesper
Copy link

I second @JivanRoquet . I'm new to reDash and within the first couple of hours of trying it out, I wondered why the query name cannot be overwritten when adding it to a dashboard.
This is more important than making a parameter available as the query title, since many cases could exist where you would filter data on a code or multiple values, but would like to give the visualization a nice name. Also it would mean only having one version of a query to maintain instead of having multiple copies of a query with just the name of it changed. So being able to overwrite the widget name would give great value.

@ashishsingal1
Copy link

Strong use case for me as well. I'm having to replicate queries over and over just to change the title for dashboards. Even an option where the query title can be overwritten on the widget level would suffice here.

@sylvestre
Copy link

Not sure it is exactly what was requested but now, with the Edit Source and "Value/Static value" (in Edit Parameters)
image
I am getting what I wanted!

@m-hiki
Copy link

m-hiki commented Oct 29, 2021

If the same queries of different parameters are used in dashboard, they can't be distinguished what the parameter is used.
スクリーンショット 2021-10-29 18 14 59

I think this proposal resolve my problem.

@ofirz
Copy link

ofirz commented Feb 4, 2022

Having the same problem, @m-hiki illustrates this very well!

@akhilpratap1991
Copy link

Just started using redash and ran into same problem. I had to replicate one query into 4 different queries with different param value so that dashboard shows different name/title. Maybe adding a widget name that overrides query title in dashboard will help. Using widget name along with static param value will solve this for me.

@shaymandel
Copy link

+1 that this is an important feature to have.
Especially for dashboards that use the same query a few times, and also for dashboards where there is an overview query shows a summary query (e.g. bar chart with build times for each service) and drill-down queries, filtered for a specific service.

@dadwin
Copy link

dadwin commented Jul 6, 2023

@m-hiki provided the great example, thank you! I have the same cases, and would appreciate changes.

I have some workarounds though:

  1. if you have a small set of charts (~10), you add several identical charts for the query, and name charts with different names. E.g. I have aggregation query and, i'd like to show daily, weekly and monthly aggregation, so I have three chart/visualisation for the query named: Daily, Weekly, Monthly, so on the dashboard I can tell which one is what.

  2. sometimes you cannot follow 1st approach because chart title can be any string/number. Here I add parameter as prefix for column which is used in grouping. Then chart legend shows me parameter and I can tell which chart is that, see the screenshot. The disadvantage here - colors assigned automatically, so they all be different across charts.

so it's not perfect but help survive 😎

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests