redash icon indicating copy to clipboard operation
redash copied to clipboard

Use parameter values in query title

Open arikfr opened this issue 4 years ago • 9 comments

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 (?).

arikfr avatar Nov 21 '19 14:11 arikfr

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?

susodapop avatar Nov 21 '19 16:11 susodapop

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).

JivanRoquet avatar Mar 28 '20 16:03 JivanRoquet

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?

arikfr avatar Mar 29 '20 07:03 arikfr

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)

JivanRoquet avatar Mar 29 '20 08:03 JivanRoquet

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.

cloudjesper avatar May 01 '20 05:05 cloudjesper

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.

ashishsingal1 avatar Nov 19 '20 11:11 ashishsingal1

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!

sylvestre avatar Jan 07 '21 15:01 sylvestre

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.

m-hiki avatar Oct 29 '21 09:10 m-hiki

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

ofirz avatar Feb 04 '22 02:02 ofirz

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.

akhilpratap1991 avatar Mar 21 '23 03:03 akhilpratap1991

+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.

shaymandel avatar May 31 '23 14:05 shaymandel

@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

dadwin avatar Jul 06 '23 10:07 dadwin