Redash updates a query’s latest_query_data_id whenever it executes successfully.
The query_results and queries tables are not directly linked, however. Results are looked up based on the query_hash which will depend on the specific parameters used in a given execution.
If you are querying the metadata db directly, you can actually join these two tables using the query_hash fields. But the JOIN is null for any query that uses parameters.
I think it can be through the interface:/api/queries/{queryId}/jobs/{query_hash} ,
When the returned status is equal to 3, I can get the query_result_id
The previous problems have been solved, and I now have another problem, that is, how to skip login verification when downloading excel and csv files;
this interface:/api/queries/<query_id>/results.<filetype>
The use of apikey you mentioned earlier does not seem to work here,
download api does not use ajax, it is impossible to add apikey in the header!
Appending a filetype of .csv or .json to this request will return a downloadable file. If you append your api_key in the query string, this link will work for non-logged-in users.
Login or sign up disabled while the site is in read only mode