Please provide a valid WRITE query

Viewed 29

I try to run minimum spanning tree algorithm inside Spark using Neo4j Connector. But when I try to call it I get an error: Please provide a valid WRITE query. My code looks like this:

    val df = (1 to 10)/*...*/.toDF()
    df.write
      .format("org.neo4j.spark.DataSource")
      .option("url", "bolt://localhost:7687")
      .option("query", "CALL gds.alpha.spanningTree.minimum.write('graph', {  startNodeId: id(1), relationshipWeightProperty: 'cost'," +
        "  writeProperty: 'CONNECT',weightWriteProperty: 'writeCost'})")
      .save()

Can calling an algorithm can be done inside write function?

0 Answers
Related