If the query contains parameters it cannot be refreshed automatically using Refresh Schedule. But if it calls several times with the same parameters it returns the same data , even if the data has been updated in the remote source.
I think the problem is with this line:
https://github.com/EverythingMe/redash/blob/master/rd_ui/app/scripts/controllers/dashboard.js#L84
The latest_query_data_id is probably the same after each call (null). What the refresh should actually do, is call getQueryResult again.
This should be resolved in v0.11.0. Please reopen if happens again.
Was this issue fixed on v0.11.0?
It seems I experienced the same problem with the one matiascarazzo mentioned earlier.
If there's some env settings I need to adjust, I appreciate your advise.
@takshio we might be talking about different issues. Can you describe the steps to reproduce your issue?
Thank you @arikfr
Condition
-Multiple queries and charts(w/parameters) on one dashboard
-Source Data (in our case, Big query) is updated every morning
If the same parameter setting are applied to a dashboard on day one and day
two, cached query/chart results on day one which don't reflect the update
on the source data are shown on the dashboard on day two.
If I click refresh icon on the individual query results and charts, it
works.
But when there are multiple queries on one dashboard, it's troublesome.
If there are any way to refresh all queries/charts on one dashboard, it's
very helpful.
@takshio thanks. I'll try to reproduce and see what's going on.
I have the same issue. A dashboard with a couple of queries wont update the one which has parameters in it. The others get updated. Manually clicking to refresh the one with parameters works though. This is with the latest release v0.11.1+b2095
Hi @arikfr - I still see it running version 0.12.0+b2449. Any ETA on the fix?
I can confirm this problem. We are also running 0.12.0+b2449. I created a dashboard with several widgets using the same parameter. When changing the parameter in the URL, widgets are not refreshed unless manually doing it for each one of them.
One thing I've noticed though is that all widgets refresh, but only the first time that a particular unique parameter is provided. After that, widgets don't refresh automatically.
Update:
I realize now that the hash of the query contains the parameter which means that Redash goes to retrieve the last cached result (which could have happened seconds, hours or days before).
As a quick, non-efficient hack, I added something like this to all my queries in the dashboard:
WHERE event_time <= '{{last_update}}'::date
event_time will always be smaller than the time in last_update which will force the server to perform the SELECT even if it happens milliseconds after (but it will leave old results in the cache). This link is generated from a widget in another board, so it鈥檚 essentially the value of now()::text.
@SlippingAway you can just add maxAge=0 parameter in the dashboard url and that will re-execute all the queries in the dashboard.
Thanks @sankalpgupta. I will try that in my dashboards.
This seems still a problem. I still need to click the refresh button after the parameter is changed.
Most helpful comment
This seems still a problem. I still need to click the refresh button after the parameter is changed.