Calling Neo4J GDS Louvain algorithm using apoc.cypher.run versus apoc.cypher.runMany

34 views Asked by At

I am trying to get results from gds.louvain.stream() by running it within apoc.cypher.runMany(). I am doing this because I want to create the GDS graph, get results from Louvain, and then delete the GDS graph all in the same query. The following attempt using apoc.cypher.run is successful and I receive the nodes and their corresponding communities as expected:

CALL apoc.cypher.run("CALL gds.louvain.stream('community_detection') YIELD nodeId, communityId, intermediateCommunityIds RETURN gds.util.asNode(nodeId).categoryName AS category_name, gds.util.asNode(nodeId).productName AS product_name, communityId ORDER BY communityId DESC;", {});

However, when I try to do the same thing with apoc.cypher.runMany, nothing is returned:

CALL apoc.cypher.runMany("CALL gds.louvain.stream('community_detection') YIELD nodeId, communityId, intermediateCommunityIds RETURN gds.util.asNode(nodeId).categoryName AS category_name, gds.util.asNode(nodeId).productName AS product_name, communityId ORDER BY communityId DESC;", {});

Any idea what I am missing here?

0

There are 0 answers