cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

error: object DataSource is not a member of package org.neo4j.spark

I am trying to read data from neo4j to Spark using the connector neo4j-spark-connector-2.4.5-M1.jar. 

When I try to import the org.neo4j.spark.DataSource throws an error that DataSource is not a member

Also in the code, 

val df = spark.read.format("org.neo4j.spark.DataSource").option("url","bolt://localhost:7687").option("authentication.type", "basic").option("labels", "Movie").load()

Error:-
java.lang.ClassNotFoundException: Failed to find data source: org.neo4j.spark.DataSource.

 

Scala version - 2.11.12

Spark version - 3.1.1

1 ACCEPTED SOLUTION

This was due to the wrong neo4j spark connector 

solved the issues with neo4j-connector-apache-spark_2.12-4.0.1_for_spark_3.jar this jar 

View solution in original post

1 REPLY 1

This was due to the wrong neo4j spark connector 

solved the issues with neo4j-connector-apache-spark_2.12-4.0.1_for_spark_3.jar this jar 

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online