Hi,
I’m trying to use the Redash db queries
table to analyse the usage of tables within our data warehouse. In particular, to determine the last time the queries have been executed/refreshed.
I’ve been using this select query to join queries
with query_results
:
select q.id,
q.name,
q.query,
qr.retrieved_at
from queries q
left join query_results qr on q.latest_query_data_id = qr.id
where not q.is_archived
In most cases the retrieved_at
column gives me the same value as the refreshed at data in the widget.
However, for some queries the retrieved_at column is disappointingly null, although the refreshed data is shown in the widget.
So, a couple of question:
Am I interpreting the queries.retrieved_at
column correctly?
For the second query, where is the refreshed at data being loaded from?
Thanks in advance,
Mark