0

I understand that the previous (now deprecated) Neo4j Spark Connector allowed for the generation of Spark Graphs and GraphFrames using the corresponding methods of the org.neo4j.spark.Neo4j class. With the Neo4j class gone, the only examples I found using the new approach generate DataFrames based on something like:

spark.read.format("org.neo4j.spark.DataSource")
    .option("url", "bolt://localhost:7687")
    .option("query", "...")
    .load()

How do I get Graph instances directly using the "Neo4j Connector for Apache Spark v4.0.0"?

mcsoini
  • 6,280
  • 2
  • 15
  • 38
  • I think that you will need to read graph nodes (via `labels` configuration) separately from edges (via `relationship` configuration), and then combine everything into a graphframe or graphx instance... – Alex Ott Feb 07 '21 at 18:21
  • Thanks, @AlexOtt, sounds like quite an unfortunate step backwards, though, in terms of API functionality – mcsoini Feb 07 '21 at 18:26
  • Yeah, I didn’t dig into the new connector yet... – Alex Ott Feb 07 '21 at 18:45

0 Answers0