I am trying to write a configuration map for gds.wcc.write
that goes through a bridge node, with specified relationships.
I think that I need cypher projection, because native projection didnt seem to be able to handle the jump, but potentially I am missing something.
Here is the schema, I need to identify all Equipment connected by a leg
Here is what I have
CALL gds.wcc.stream({
nodeQuery: "MATCH (n) WHERE n:Equipment OR n:Leg OR n:OPCODE RETURN id(n) as id",
relationshipQuery: "MATCH (s:Equipment)-[r1:DRAINS]->(l:Leg)-[r2:FEEDS]->(t:Equipment) RETURN id(s) AS source, id(t) AS target, id(l) as leg, id(r1) as feed, id(r2) as prod"}
)
Originally I was connecting Equipment directly next to Equipment with a different relationship, but now I need to add this Leg in the middle of things. Originally I could just execute this:
CALL gds.wcc.write({nodeProjection: "Equipment", relationshipProjection: "CONNECTS_TO",writeProperty: "community_id"}
Thanks for any help!