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.

How to create a relationship, given neo4j Nodes and a relationship table?

I've created Node from csv files, and I have a relationship table with headers [':START_ID (Actor)', ':EDN_ID (Musical)']. But I'm struggling to create a relationship. Not sure how I can specify the start node and end node using the relationship table. Thanks a lot. 

 

#py2neo 

2 REPLIES 2

Try something like the following:

match(n:Actor{id: START_ID})

match(m:Musical{id: EDN_ID})

merge(n)-[:RELATIONSHIP_TYPE]->(m)

Thanks for your reply. I've solved the problem by using matcher to get the nodes based on the property in relationship table.  Thanks a lot though!