Heallo 我有关于存储已实现的逻辑信息流的关系(技术信息流)的集合属性:
SrcApp1 - EntityA - TrgtApp2,
SrcApp2 - EntityA - TrgtApp3,
SrcApp3 - EntityB - TrgtApp4
我想更新集合以仅存储实体:
EntityA,
EntityB
Psydo cypher查询:
MATCH (a)-[r]->(b)
For each oldDesc in r.DescriptionSet
newDesc = Split(oldDesc," - ")[1] //get the middle value out of SrcApp1 - EntityA - TrgtApp2
r.DescriptionSetNew.Add(newDesc)
Next oldDesc
谢谢和最好的问候
答案 0 :(得分:0)
这应该有效:
MATCH (a)-[r]->(b)
SET r.fooNew = [d IN r.foo | SPLIT(d, " - ")[1]]
DELETE r.foo;