cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

SQL Warehouse cluster is always running when configure metabase conneciton

xfun
New Contributor II

I encountered an issue while using the Metabase JDBC driver to connect to Databricks SQL Warehouse: I noticed that the SQL Warehouse cluster is always running and never stops automatically. Every few seconds, a SELECT 1 query log appears, which I suspect might be Metabase JDBC Databricks driver's method of maintaining a persistent connection, though I'm not entirely sure. I'm wondering how to configure it so that when no one is using Metabase, the SQL Warehouse does not continuously execute the SELECT 1 query, and the SQL Warehouse can appropriately stop.

ยทยทยท

(defmethod sql-jdbc.conn/data-warehouse-connection-pool-properties :hive-like
[driver database]
;; The Hive JDBC driver doesn't support `Connection.isValid()`, so we need to supply a test query for c3p0 to use to
;; validate connections upon checkout.
(merge
((get-method sql-jdbc.conn/data-warehouse-connection-pool-properties :sql-jdbc) driver database)
{"preferredTestQuery" "SELECT 1"}))

ยทยทยท

 

1 REPLY 1

xfun
New Contributor II

Will try to remove "preferredTestQuery" or add "idleConnectionTestPeriod" to avoid keep send select 1 query.