Queries, parameters and public dashboards

Hello,

We have three pressing issues with our redash public dashboard and hoping that someone could point us in a right direction.

Issue #1.

We ran into some issues with parameters. We have the following query:


SELECT user_id,
       `top_prediction_%`,
       `top_prediction_(text)`,
       datetime(DateTime) AS thedate,
       UserIdNum
FROM query_3
WHERE cast(useridnum as int) = '{{ useridnum }}'
  AND thedate >= '{{ mydate.start }}'
  AND thedate <= datetime('{{ mydate.end }}')
  AND RequestType = '3'

We use it to create a visualization on a dashboard that we publish publicly. However we get this warning:

sharing is currently not supported for dashboards containing queries with text parameters

Where in our query exactly do we have text parameters? We thought that the date parameters are allowed on public dashboards and the useridnum does not seem to be a text parameter.

Issue #2.

We have a number of users and would like to have one public dashboard for all of them, with user ids being in a dropdown list. However, we need somehow restrict this dropdown list so our users can only select their user id with other user ids being greyed out, not shown, or restricted somehow. What is the best way to go about it?

Issue #3

The public dashboard with visualizations from both non-parameters and with parameters queries does not refresh automatically.

Technical details:

  • Redash Version: 10
  • Browser/OS: chrome
  • How did you install Redash: self hosted on AWS

For issue #1 can you verify that you have definitely changed the useridnum parameter to a number type parameter?

For issue #2, I responded to your PM on this subject. The short answer is that what you describe is not supported in Redash.

For issue #3, there’s not enough information to help you yet. Parameterised dashboards will not refresh automatically ever. If you observe this behaviour with a non-parameterised dashboard it would be good to provide a bit more context about your query schedule. Does it seem to refresh on a schedule when not viewed from the public link?

#1.

This is from our query:

WHERE cast(useridnum as int) = '{{ useridnum }}'
and the data source this variable is set up as number too. How else can we verify that it is set up as a number type parameter?

#3. We have a public dashboard that has widgets from both non-parametrized and with parameterized queries. We can set up query update schedule for all like every hour. How will such public dashboard update for a user? Non-parametrized widgets will update automatically, but to update parametrized widgets, the user will have to load the dashboard again (or refresh it)?

Regarding #1, you haven’t checked the parameter type in Redash. You can do this while editing the query. Click the little gear icon beside the parameter widget and confirm it’s of type number:

Regarding #3, public dashboards don’t execute queries automatically. They simply load the most recently cached value. The one exception is for parameterised queries which will be executed when the user changes a value and clicks “Apply”. But when the dashboard first loads it will pull the cached value.

We’ve said for years: Redash isn’t really designed for this use case.

ok, #1 is solved.

For #3, can you explain in more detail how does the public dashboard update? I understand what happens for widgets based on parametrized queries, but for the widgets that are based on non-parametrized queries, how do they update on a public dashboard? Let’s say the query is set to update every hour, if I load the public dashboard it will show me the results cashed from the hour ago? And in two hours, it will show the results from the last update 60 min ago?

We do not need data to be shown in real time to the second, but one or more updates per day is what we would like to have.

A public dashboard only updates when the page is refreshed. It will pull the most recently cached result. If you schedule a query to update once per hour and then load a public dashboard that includes that data, the public dashboard will show the same values for eternity until you refresh the page.

Ok, got it , thank you. I have another question about the dates and our heatmap, I posted a new question.

1 Like