cancel
Showing results for 
Search instead for 
Did you mean: 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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. 

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you won’t want to miss the chance to attend and share knowledge.

If there isn’t a group near you, start one and help create a community that brings people together.

Request a New Group