How to refresh only a particular tile in a dashboard ?

I have started using looker_sdk.init40 python package.

For now i am able to refresh a query linked to a tile id . However this query refresh doesnt get reflected on that tile. My use case is that in a dashbaord of say 30 tiles. I want to run queries for the 30 tiles one by one and then refresh the tiles . Currently upon opening the dashboard page all the 30 tiles start querying which I dont want this to happen.

How do I force refresh tile in this case? Havent been able to do this. Is this even supported ?

Can you clarify a little further what you are doing? Are you building a web app with Looker embedded?

Is the goal to have the dashboard populate immediately when someone opens it?

I am not building a web app.

Currently, when someone opens the dashboard, all the tiles start running their queries simultaneously, which causes some queries to fail, especially in dashboards with around 30 tiles.

My goal is to control query execution better. I want to pre-run each query in the background and then update (or refresh) each tile one by one with the pre-executed results, rather than letting all the queries run at once when the dashboard is opened.

Is there a way to programmatically update or force-refresh the tiles with specific pre-executed query results using the Looker SDK? Or is this behavior not supported?

The easiest way to do this would be to schedule the dashboard to be sent even to a dummy address - this will allow all the results to be cached for when a human actually opens the dashboard. You can of course do the same thing for the whole dashboard or even query by query via the API - get the dashboard ID, get the list of queries that depend on it, and run the queries.

Yes you are right we want to force refresh dashboard before someone opens this.

But not the complete dashboard in 1 go… but tile by tile refresh. I can refresh the query via api but not the tile. Worst part is that tile doesnt refresh if its query has been updated.

I havent come through such a method searching through the repo. Any idea if its even possible ?

I think it should be possible - just note that you have to use the json_detail ouptut format for a query to set the cache. It is also recommended to use the asynchronous endpoints for doing this type of thing. There is actually a script in the Looker Open Source repo that you might find useful for what you are trying to achieve.

So far I havent found the way to refresh tile.

I can refresh query and I can update the tile to new queryid or new title. But the actual tile doesnt get refreshed via api. It only does get refreshed if that dashboard’s page is opened/refreshed unfortunately. I also saw similar discussion in some different forum and this tile refresh feature was requested. I cant find it now. But yeah thats where I am stuck

You are definitely using json_detail as the output format?