See I have name and component id column by using wcc alogorithm. But i would like to diaplay a new third column name like relationship, that column should display the relationship type of the name who are connected in a same cluster.
My code is to create a graph:
CALL gds.graph.create.cypher(
'my-graph55',
'MATCH (n:person) RETURN id(n) AS id',
'MATCH (a:person)--()--(b:person) RETURN id(a) AS source, id(b) AS target'
)
My code is to find the componentid:
CALL gds.wcc.stream('my-graph5')
YIELD nodeId, componentId
RETURN gds.util.asNode(nodeId).name AS name, componentId
ORDER BY componentId, name
YIELD graphName, nodeCount, relationshipCount, createMillis;