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: 

Snowflake connection to Databricks error

Madman
New Contributor II

When I am trying to read snowflake table from my databricks notebook, it is giving the error as:

df1.read.format("snowflake") \

.options(**options) \

.option("query", "select * from abc") \

.save()

Getting below error

java.sql.SQLException: No suitable driver found for jdbc:snowflake://https://snowflake_username.snowflakecomputing.com

sfUrl="https://snowflake_username.snowflakecomputing.com"

I tried below possibilities for sfUrl:

1. Removed "https://" from sfUrl and tried with sfUrl="snowflake_username.snowflakecomputing.com"

2. Added "jdbc:snowflake" and tried as sfUrl="jdbc:snowflake://https://snowflake_username.snowflakecomputing.com"

3. Removed "https://" and added "jdbc:snowflake" and tried with sfUrl="jdbc:snowflake://snowflake_username.snowflakecomputing.com"

In all the cases I am getting the ame error. Can any one please help me with the correct solution?

Thank you very much in advance.

5 REPLIES 5

Stokes
New Contributor II

The Databricks version 4.2 native Snowflake Connector allows your Databricks account to read data from and write data to Snowflake without importing any libraries. Older versions of Databricks required importing the libraries for the Spark connector into your Databricks clusters.

Sashi_Gunturu
New Contributor II

Hi,

I am unable to read data from Snowflake using the code base given by databricks.

I am able to get the count of the rows of the table. But, I cannot do any other queries.

I get the ResultSet Error.

dataset = spark.read.format("snowflake").options(**options).option("dbtable", 'CUSTOMER').load()

// This throws an error

display(dataset)

java.sql.SQLException: Status of query associated with resultSet is FAILED_WITH_ERROR. Results not generated.

However, printing count works

display(dataset.count())

Greatly appreciate your help.

pdiegop
New Contributor II

Hi @Sashi_Gunturu I have the same exact problem. Did you managed to solve it?

Thanks

Diego

anurag2192
New Contributor II

Hi @Sashi_Gunturu , we are getting same error. Were you able to find a workaround. Our process is running as expected, but suddenly got this error from today morning.
java.sql.SQLException: Status of query associated with resultSet is FAILED_WITH_ERROR. Results not generated.

pdiegop
New Contributor II

@anurag2192 did you managed to solve it?

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