Head's Up! Site maintenance this Wednesday, February 1. Disruptions expected as we migrate the forums.
β05-17-2020 08:43 AM
Hi,
I'm looking for a way to use apoc.create.vRelationship on apoc.path.subgraphAll results.
For example, lets take the same data from documentation about subgraphAll:
The following returns the subgraph reachable by the KNOWS
relationship at 1 to 2 hops from Praveena.
MATCH (p:Person {name: "Praveena"})
CALL apoc.path.subgraphAll(p, {
relationshipFilter: "KNOWS",
minLevel: 1,
maxLevel: 2
})
YIELD nodes, relationships
RETURN nodes, relationships;
If from some reason Zhen had several relationships to Martin and I wanted to aggregate them into one using apoc.create.vRelationship, how can I specify the "from node" and "to node" parameters for the function from the "YIELD nodes, relationships"?
And more generally, for any given result from apoc.path.subgraphAll, how can I use vRelationship function to aggregate relationships for specified source and target node labels?
Thanks.
Using
β10-28-2020 10:48 AM
I know it has been three years since this post. But have you figured out a way to approach this? I have similar question on it as well.
All the sessions of the conference are now available online