I am trying to load a dataframe (df) into snowflake. The table is created in snowflake and I am trying exactly what's written in the documentation.
I am doing the below:
df.show()
sfOptions = {
"sfURL" : "",
"sfAccount" : "",
"sfUser" : "",
"sfPassword" : "",
"sfDatabase" : "",
"sfSchema" : "",
"sfWarehouse" : "",
"sfRole" : "",
}
,(where appropriate values were kept in the variables)
SNOWFLAKE_SOURCE_NAME= "net.snowflake.spark.snowflake"
df.write.format(SNOWFLAKE_SOURCE_NAME).options(**sfOptions).option("dbtable", "<tablename>").mode('append').options(header=True).save()
I got this error:
**: java.lang.ClassNotFoundException: Failed to find data source: net.snowflake.spark.snowflake**
I added the snowflake-spark connector and the snowflake jdbc connector to PATH in environment variables and used that while creating the spark session as well. Still the issue persists.
I tried multiple routes but no luck. Any lead will be appreciated.