I have a text property and some have an "-->" in it. I want to replace this arrow with a Cause relation and split this one node in two nodes and delete the original one afterwards. Here you can see the query:
</ ```
MATCH (n:FMEA) WHERE n.text='Voids in Poly-S and therefore uncontrollable shape of field plate --> Yb loss' and n.nickname='PLASMA ETCH TRENCH' and n.technology='SMART6_80V_8' and n.cell='Effect' and n.PID='1572 (measure 1963)'
create (firstNode:FMEA {nickname:n.nickname,PID:n.PID,technology:n.technology,text:'Voids in Poly-S and therefore uncontrollable shape of field plate',clean_text:'',cell:n.cell, label:'FMEA'})-[:CAUSES{nickname:n.nickname,PID:n.PID,technology:n.technology}]-> (lastnod:FMEA {nickname:n.nickname,PID:n.PID,technology:n.technology,text:'Yb loss',clean_text:'',cell:n.cell, label:'FMEA'})
with n,firstNode,lastnod
match (head)-[:CAUSES]->(n)
with n,firstNode,lastnod,head
unwind [head] as h
create (h)-[:CAUSES{nickname:n.nickname,PID:n.PID,technology:n.technology}]->(firstNode)
with n,firstNode,lastnod,head
match (n)-
[:CAUSES]->(tail)
with n,firstNode,lastnod,head,tail
unwind [tail] as t
create (lastnod)-[:CAUSES{nickname:n.nickname,PID:n.PID,technology:n.technology}]->(t)
with n,firstNode,lastnod,head,tail
DETACH DELETE n
The query gives me following output: Added 2 labels, created 2 nodes, set 20 properties, created 2 relationships, completed after 579 ms
Thanks in advance!