cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Information about stoping JDBC connection

Joao_DE
New Contributor III

Hi everyone!

I would like to know how spark stops the connection when reading from a sql database using the JDBC format.

Also, if there is a way to check when the connection is active or manually stop it, I also would like to know.

Thank you in advance!

3 REPLIES 3

Debayan
Databricks Employee
Databricks Employee

Hi, the connection will be active, it connects through JDBC hostname/IP and port number. you can check the connectivity by running #[%sh]​ sh telnet <jdbcHostname> <jdbcPort>

Please refer to: https://docs.databricks.com/external-data/jdbc.html

Please let us know if this helps.

Joao_DE
New Contributor III

Hi, thank you for your help! I got that error

imageAlso, do you know if there is a way to close the connection manually. I am building an ingestion pipeline that uses a master notebook that calls a child notebook. On the child notebook is where the JDBC connection is stablished. So, if after that notebook execution the connection closes I wont need to close it manually, otherwise I need or when that child notebook is called again new connection can be stablished

Anonymous
Not applicable

Hi @João Peixoto​ 

Hope everything is going great.

Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you. 

Cheers!

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