-1

Is there any way to write data in Neo4J db using spark native API in java. Is like GraphFrame (org.graphframes.GraphFrame) available in spark-connector same as Neo4J graph and can we dump this in db.

Though we tried the native neo4j API in spark that iterates over each row and dump it in graph db.

Stanislav Kralin
  • 11,070
  • 4
  • 35
  • 58
User_qwerty
  • 375
  • 1
  • 2
  • 10

1 Answers1

1

I don't believe there is any native Neo4j API in Spark (yet). What you can do to write data from your Spark application to Neo4j is indeed make use of the neo4j-spark-connector. To be honest there is not a lot of information about this, but according to the documentation you should be able to write data from your Spark graph to Neo4j using the saveGraph() function. For writing DataFrames back to Neo4j you can use the mergeEdgeList function.

Source: https://github.com/neo4j-contrib/neo4j-spark-connector

RudyVerboven
  • 1,204
  • 1
  • 14
  • 31