I have searched for a similar topic and did not find one, so here goes:
System: MacBookPro, OS 11.5.1, Intel Chipset
Neo4J: Enterprise v4.3.2
I have meticulously (copied) the GDS 1.6 Examples (Section 3) for:
totalCostproperty was mutated correctly:
Can someone from Neo4J verify the .write() issue associated with these algorithms. BTW: I stopped with these, assuming the bug was ubiquitous.
Hello @skerr ,
thank you for reporting the error!
I could verify the error and it seems to occur when running Yens multiple times with different modes.
Running f.i. only write mode works.
I hope this can be a workaround for now and we will investigate further in the meantime.
Update: Using mutate + writeRelationship worked for me.
The problem lies in the chained execution of the examples.
On mutate, you create a new relationship type in the in-memory graph. The created
PATH relationships only have the property
totalCost but not
When you execute the write example afterwards, GDS checks if all relationships have a
cost property defined. This is not the case for the newly created
To exclude the newly created PATH relationships, specify
Florentin: Thank you for verifying the issue. My follow-up question:
I thought the entire point of the chained execution is the ability to write the optimized relationship
PATH and the relevant properties between the sourceNode and targetNode back in the Neo4J database. In your comment you note to exclude the
PATH relationship. Why?
We have three main modes for our algorithms: stream, mutate, write.
Stream - Directly returns the results, easy to inspect but inefficient to persist.
Mutate - Writes the result into the GDS in-memory graph (not persisted on the neo4j db). The results can be used in following GDS algorithm/procedure calls.
Write - Writes the result into the neo4j db. Not usable in GDS without projecting a new graph.
However, after mutate you dont need to recompute the result to write it back to the neo4j db.
To simply write the computed result back to Neo4j you can use (Graph Catalog - Neo4j Graph Data Science)