I've recently been building an app that retrieves data from BigQuery and displays it in a variety of tables. My BigQuery table is set to be partitioned on day, and clustered by hour and minute.
If I run a query inside BigQuery such as
WHERE Date(CreatedDate) = Date("desired_date") AND
Hour BETWEEN 8 and 8 AND
Minute BETWEEN 5 AND 10
The query takes around ~4 seconds, and processes 250mb of data.
However, when executing this query in my retool resource to retrieve the same data, the query runs for 30 seconds then (assumedly) times out. The query returns a 502 response in dev tools, waiting 30.1 seconds for a server response.
I've tried upping the default timeout on the resource to 120000 (120 seconds) to no avail, it still fails at exactly 30 seconds.
In BigQuery itself, under Project History, I can see the query succeeded and took approximately 2 seconds, so it appears the issue lies with the queried data making its way back from bigquery into retool.
Have I misunderstood how the timeout works with the BigQuery resource? Or am I misunderstanding the root cause of the query not returning correctly?
Any advice would be greatly appreciated.