cancel
Showing results for 
Search instead for 
Did you mean: 

Updating existing relationships with py2neo

Hello
I am very new to Neo4j and py2neo. I am using them to create a graph of data related to jobs, organisations and education.

I have succesfully built my graph, however I am now needing to update properties for certain relationships in my graph. I have been able to find these relationships using the NodeMatcher() function but I cannot work out how to update the properties of these relationships. Here is the code I have used to find these relationships.

node_matcher = NodeMatcher(graph=graph)
rel_matcher = RelationshipMatcher(graph=graph)
job_node = node_matcher.match("Job", job_title="Representative")
skill_node = node_matcher.match("Skill", skill_name="Sales")
skill_job_rel = rel_matcher.match(nodes=(skill_node.first(),job_node.first()),r_type="skill_used_in")

This particular relationship has a property "count" which I would like to update. Does anyone know how I can do this? Please let me know if you need anymore information regarding my problem

Cheers

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

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.