I created my first dashboard… very cool. BUT, how do I update the data in my dashboard. Is there a way to set frequency of updates or rerun the query. For example, in my dashboard I’m looking at new orders in my MySQL database. Worked great. But, I’m not seeing any way to update the data when it’s in a dashboard.
Actually, I don’t even see a method to click and rerun the query other than changing my question which allows me too rerun it.
Hey there @billm. Great to hear you’re exploring using dashboards in Metabase.
If you’re looking for the most recent data, every time a dashboard is loaded or refreshed every question in the dashboard will run and you’ll have the most recent data based on your query.
Right now there’s not a setting to auto refresh the dashboard so you’d need to manually refresh the page if you’ve had it open already, but we’re exploring features like that as part of enhancing dashboards generally.
When you say “update the data” are you looking for something else besides the results being up to date in your dashboard?
@kdoh & @billm Looks like you can schedule updates for dashboards now. However, there are only options refreshing at 60 minute or less intervals.
Do dashboards refresh the data every time the url is loaded still? Thats probably wasteful for a lot of use cases (nearly 100% of our use cases).
A great feature would be to add an option for daily refreshing. There are a lot of companies that do daily batch processing overnight, so having 1h refreshing as the least frequent option is redundant and wastes resources.
Implementation ideas: Redash allows you to chose an hour to run daily or weekly refreshes as well.
Good thoughts, ryank. We’re currently working on a few things to this end: caching for questions is being actively implemented, and we’re also discussing scheduling for large queries and/or dashboards.
Any updates to this (now #4490 has been merged)? There seems to be a refresh option viewing dashboards when logged in, but I’m at loss how to get an updating dashboard that is shared with a public link (for kiosk-style dashboard, for example).
any updates to this? can we schedule our dashboards to get refresh only at certain time interval and not every time the page loads.
To refresh an open dashboard regularly, such as if you have one on a TV or kiosk, use the clock icon that’s in the top-right. On public dashboards, the icon is in the bottom-right:
To keep questions in dashboards from re-running the query every time the dashboard is opened, you can turn on query caching. More about that feature here: https://www.metabase.com/docs/latest/administration-guide/14-caching.html
Any answers to the initial question ?
We’ve just started using Metabase and so for you love it !
However, we have dasboards using query that can take 10mintues to run.
So, we will appreciate to have a solution to auto-refresh dashboard in background (without opening it) every day at 8am for instance.
Would it work just to have curl or wget or something set in cron to fetch the desired URL (or run a script that fetches a whole bunch of different URLs you want to have ready to go at a certain time)? That should warm the Metabase cache (right… anybody?).
Yes, it would work but only until the cache times out when some random user will have to wait for the new queries.
Better solution is to do ‘something’ at the database layer. Easiest is to have some cache tables that hold just the data that your query will need. Depends upon how you plan to query the database as it will provide a bunch more tables.
In MS SQL, I’d probably create an indexed view or take a look at column store indexes. That’s MS specific but similar things are available in some other databases.
Quite right I guess I assumed the goal here was not to touch the database schema (speaks volumes about the world in which I live…)
Separate reporting database? Depends how up to date you need your data to be.
I tried that for exact the same reason as @chucklessmith, very large database (100GB), need to warm the cache (to not annoy users) but somehow it doesn't work. Any ideas? I am using basic auth
5 * * * * usr/bin/curl -u 'user:pass' 'https://example.com/public/dashboard/11111111'
Doesn't seem to cache the dashboard
ps I can't do anthing on database level unfortunaltely (not managed by me)
You'll need to get all the cards (questions) on the dashboard and cache those. Your curl command will only get the metadata of a dashboard.
Use your browser developer Network-tab to see the requests being made.
Perfect! thanks so much @flamber