Join the free virtual developer conference on knowledge graphs and AI. This year's themes are: applications, AI engineering, data intelligence, graphs, and architecture.
I am exporting the database out to a flat file.I am extracting the nodes without any problems but I am finding it hard to extract the relationships. For example, the database load has a definitions
there are only 29 nodes in the database. (inode:0 to inode:28) and I can get the nodes easy enough (Match (a) return a.inode, a.name) but when I try to get the relationships, I get the internal index, not inode.
So the command: match (a)-[c]-(b) return c returns
I'm not sure what you want exactly, but I did this:
MATCH(c:Category)-[:IS_IN]->(b:Bucket)
RETURN b.Name AS Buckets,
apoc.coll.sort(collect(DISTINCT c.Name)) AS Categories ORDER BY b.Name
Where there is a many to many relationship between Buckets and Categories. (Categories can belong in multiple Buckets and Buckets can contain multiple Categories).
You can then export as JSON, and for each Bucket, there will be a list of Categories.