Сравните данные двух узлов разных меток в Neo4j с некоторым свойством

0
задан Vartika 3 April 2019 в 06:42
поделиться

2 ответа

Вы можете использовать плагин Apoc (см https://neo4j-contrib.github.io/neo4j-apoc-procedures ):

Match(n:Person{ssid:"1234"}) with collect(n) as nodes CALL apoc.refactor.mergeNodes(nodes) YIELD node RETURN node
0
ответ дан CIAndrews 3 April 2019 в 06:42
поделиться

Это решение я придумал

MATCH(cxc:CXCustomerHierarchy)-[:_properties]->(auditnode)-->(spoke)
 where cxc._type='CXCustomer' OR  cxc._type='CXCustomerBU' AND spoke.start_date <= 1554272198875 <= spoke.end_date AND spoke.status = "Confirmed"
 with cxc
 OPTIONAL MATCH (cxc)<-[r:CXCustomerHasChild]-(parent) with cxc
 MATCH(csav:CSAVHierarchy)-[:_properties]->(auditnode)-->(spoke) with cxc,csav
 where csav._type='CXCustomer' OR  csav._type='CXCustomerBU' AND spoke.start_date <= 1554272198875 <= spoke.end_date AND spoke.status = "Confirmed"
 OPTIONAL MATCH (csav)<-[r:CSAVCustomerHasChild]-(parent) with csav,cxc
return 
CASE
WHEN csav.sourceSystemId <> cxc.sourceSystemId , csav.elementLabel <> cxc.elementLabel
THEN csav.elementLabel
ELSE "SIMILAR DATA "  END As result
0
ответ дан Vartika 3 April 2019 в 06:42
поделиться
Другие вопросы по тегам:

Похожие вопросы: