cancel
Showing results for 
Search instead for 
Did you mean: 

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

fathima
Node

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

fathima
Node

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

fathima
Node

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