Can neo4j community edition integrate with Apache Spark ?
I created a sparksession like this and created Neo4j(sc) object but when I run cypher queries, it always gives me 0 output telling that cypher returned nothing.
val Spark = SparkSession
.builder().master("local")
.config("spark.neo4j.bolt.url", "bolt://xxx.xx.xx.xxx:xxxx")
.config("spark.neo4j.bolt.user", "neo4j")
.config("spark.neo4j.bolt.password", "###")
.appName("SparkIntegrationNeo4j")
.getOrCreate()
neo = Neo4j(sc)
val rdd = neo.cypher("Query").loadRowRdd
Looks like you're using the old driver - there is a newer driver in beta that is used in a different way. Please have a look at this documentation for the new connector.
GraphFrames in Spark are not a thing that is going to be supported going forward, because this part of the spark environment is not well supported, and neo4j is a better environment to use for graph operations and algorithms. If you want to know how to load anything from the graph into a DataFrame, consult these documentations:
Thanks David, I am able to read from neo4j and create a RDD or a Dataframe...
I am trying to save dataframe into neo4j... that is where I thought graphframes would work
@VGVG I can't help you with 2.4.5-M1, partially because I don't know. I recommend you upgrade to 4.0.0 and use the "write" instructions in the documentation that I linked to save a dataframe to Neo4j. At this point, 2.4.5 is old code that I myself don't use that much, and it won't be receiving much attention going forward.