How can I get how many times a query has been refreshed (manually or automatically) on redash?

I am trying to monitor query level refreshes on redash but am not able to find any data for the following:

  1. Number of times a query has been refreshed and whether it was manual or automatic?
  2. If there’s any dashboard level refresh that has been setup for a dashboard and the corresponding refresh window?

Can someone please help with this? The auto-refresh of queries is failing so this dashboard is needed for monitoring

On my side, I’ve connected the PostgreSQL to redash and I’m performing the following query

from events
where object_type = 'query' and action = 'execute' and object_id = '445'
order by id
limit 10

445 is the queryId I want to monitor. But it seems that an entry is created only for manual refresh.

Hope it helps

Hi @xavier-d,
Thanks for your response!
I have connected the PostgresSQL and I manually checked how events are recorded in the events table. Below are my observations:

  1. When you write any query and click on the “execute” button specifically, data is recorded in the events table under ‘execute’ action and another row is added under ‘execute query’ as data source is refreshed.
  2. When you manually refresh a query, data source is refreshed so a row is added in the events table under ‘execute query’ action.

I could not find any entry for auto refresh or even how to separate ‘execute’ from manual refresh. Please let me know if your observations are different or you have found a pattern for recording refreshes.

I’m seeing the same on my side.
I don’t find any event so far for the automatic refresh

I think we’ve discussed a few times in the past on the forum that the events table isn’t really meant to make these distinctions. We would absolutely review and merge a PR implementing a more robust separation between different kinds of executions.

With that out of the way:

Yep this is normal. The events table records actions which occur as a result of user interaction. Scheduled query executions are kicked-off by Redash itself and don’t appear here. They aren’t preserved anywhere.

Thanks for the clarification Jesse!