cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Inferred graph of common directors for link prediction

I am trying to create an inferred graph of common directors based on directors in the same company. Additionally, I am trying to store a property on the relationship indicating the year of their first directorship:

CALL apoc.periodic.iterate(

"MATCH (f:Executive)<-[:EXECUTIVE]-(c:Company)-[:EXECUTIVE]->(g:Executive)

WITH f, g, c

WITH c, f, g, toString(c.incorporation) AS date

ORDER BY f, date

RETURN f, g, collect(date) AS year, count(*) AS collaborations",

"MERGE (f)-[common:COMMON {c.year}]-(g),

SET common.collaborations = collaborations

",

{batchSize: 100})

However, the operation is failing.

Anything that I may be doing wrong?

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online