The "Query has been timed out due to inactivity" error with Tableau flows connected to Databricks Serverless SQL Warehouse is a known and intermittent issue impacting several users, even when the SQL warehouse does not auto-terminate during the process. The core situation is that, after the query is reported as "finished" in Databricks, it later transitions to a timeout status due to inactivity, possibly reflecting a disconnect between Tableau (or another BI tool) trying to fetch results and the Databricks backend.โ
Key Points and Causes
-
This timeout often occurs not because the query itself is long-running, but instead due to delays or failures in the client (Tableau) fetching results after the query completes in Databricks.โ
-
In several similar cases involving Tableau and even Power BI, the query wall-clock time in Databricks can be short, but result-fetching by the client takes excessively long, resulting in a disconnect or timeout in Databricks regardless of client-side settings.โ
-
It's not always related to SQL warehouse auto-termination; these errors can still happen even when the warehouse remains available.โ
-
The issue can also arise from JDBC/ODBC connection settings, high network latency, or client-side timeouts.โ
Suggestions and Workarounds
-
Check and, if possible, increase the query and connection timeout durations in Tableauโs settings, as well as in the Databricks SQL Warehouse configuration. Databricks provides a STATEMENT_TIMEOUT parameter that controls maximum allowed execution time for SQL statements, but the inactivity timeout might be coming from a coordination issue between Tableau fetch and Databricks' expectations.โ
-
Investigate JDBC/ODBC settings used by Tableau to connect to Databricks, adjusting idle timeout or keep-alive intervals to keep the connection active during long data fetch periods, especially for large data sets.โ
-
If network instability is a factor, consider running Tableau Server and Databricks in closer network proximity or increasing resources to improve fetch times.โ
-
If this is happening on certain tables/partitions that are much larger, consider breaking queries into smaller, more manageable chunks or optimizing the dataset to reduce fetch durations.โ
-
It may not be possible to fully resolve this solely from the Tableau sideโif the behavior persists, contact Databricks support with query IDs and timings, as community reports indicate this may sometimes be a cloud backend issue out of direct client control.โ
Community and Support Engagement
-
This problem has been discussed in community forums, and users are encouraged to supply error messages and detailed flow history to Databricks or Tableau support for deeper debugging, as the fix can sometimes involve configuration changes or cloud-side updates.โ
In summary, the error is likely related to an extended result fetch phase where Tableau waits for large datasets, causing Databricksโ inactivity timer to trigger. Adjusting connection, query, and fetch timeout settings on both ends may mitigate the issue, but a robust solution may require assistance from both Tableau and Databricks support teams.โ