neo4j browser export file including relationships

淺唱寂寞╮ 提交于 2019-12-08 03:02:33

问题


How to export including relationships? I've found that executing the default query

MATCH (n) RETURN n

Does return what I need graphically including the relationships between nodes (AUTO-COMPLETE switched on). I see my nodes and their relationship.

But when I save it either CVS or JSON it does not includes the relationships. Any idea how can I do it?


回答1:


This is how you'd get all the nodes and their outgoing relationships, if any.

MATCH (n)
OPTIONAL MATCH (n)-[r]->()
RETURN n, r;

Each relationship will tell you what its start and end nodes are, so you can get the end node's ID from it.

If you want to get the end node returned as well:

MATCH (n)
OPTIONAL MATCH (n)-[r]->(m)
RETURN n, r, m;


来源:https://stackoverflow.com/questions/36013948/neo4j-browser-export-file-including-relationships

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!