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:ย 

How to restart snowflake connector?

DavidMayer-Foul
New Contributor II

After using spark.read.format("snowflake").options(**options).option("dbtable", "table_name").load() to read a table from Snowflake, when I then change the table from Snowflake and read it again, it gives me the first version of the table. I have worked around the problem by restarting the cluster. Is there a better way? Maybe restarting the snowflake connector or configuring it differently?

1 REPLY 1

DavidMayer-Foul
New Contributor II

Yes, that would work. However, it is a longish Snowflake query producing a number of tables that are all called by the Databricks notebook, so it requires quite a few changes. I'll use this alternative if I automate the process.

However, I think this is a serious issue that deserves a warning from Databricks when using snowflake connector. One implicitly trusts that the connection will work, and there is no reason programmers will limit their snowflake changes to the particular ongoing connection.

In any case, under the hood, I imagine a connection engine has been created that could be closed and reopened. Maybe one could access that engine with standard snowflake sqlalchemy commands from the notebook?

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