Ulyses
Ulyses

Reputation: 121

Problem with cassandra-connector at "load()"

I downloaded succesfully this connector: com.datastax.spark:spark-cassandra-connector_2.11:2.5.1

And when I try to load the information with this line:

data = sparkSession.read.format("org.apache.spark.sql.cassandra").options(table="tbthesis", 
keyspace="test").load()

I get this error:

Exception has occurred: Py4JJavaError
An error occurred while calling o48.load.
: java.lang.ClassNotFoundException: Failed to find data source: org.apache.spark.sql.cassandra. 
Please find packages at http://spark.apache.org/third-party-projects.html

Any ideas besides what the error suggests about "Look for another connector"? Indeed, this is the connector which several professionals have suggested me to use, hence it most be something else I think.

Thanks!

Upvotes: 1

Views: 1397

Answers (1)

Ulyses
Ulyses

Reputation: 121

My problem is solved, I had to download:

--packages com.datastax.spark:spark-cassandra-connector_2.12:2.5.1

which is the right connector for my scala version: 2.12.10

Thank you all for your support!

Upvotes: 1

Related Questions