Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-06-2020 06:13 AM
Hello everyone,
I have a graph which includes a hierarchy of nuts regions, among others.
This is the cypher which was used to create the hierarchical relationships between the different levels of regions:
MATCH (n3:Nuts3)
MATCH (n2:Nuts2 {code: left(n3.code, 4)})
MERGE (n3)-[:PART_OF]->(n2);
MATCH (n2:Nuts2)
MATCH (n1:Nuts1 {code: left(n2.code, 3)})
MERGE (n2)-[:PART_OF]->(n1);
MATCH (n1:Nuts1)
MATCH (c:Country {code: left(n1.code, 2)})
MERGE (n1)-[:PART_OF]->(c);
So basically, every NUTS 3 region (the lowest level) is a part of a NUTS 2 region which is in turn part of a NUTS 1 region.
However, when I CALL db.schema.visualization
, I get the following:
Can someone explain to me where the self-ties and the reciprocal ties between Nuts1 and Nuts2 come from? Is the creation of the ties a bad way to do it? Or did I misunderstand something about the schema visualization?
Best
Jakob
Solved! Go to Solution.
11-06-2020 09:56 AM
Agree, the output doesn't look correct.
Try this and compare
call apoc.meta.graph()
11-06-2020 09:56 AM
Agree, the output doesn't look correct.
Try this and compare
call apoc.meta.graph()
11-06-2020 10:17 AM
Thanks, That does indeed give the correct graph. Any idea why the Schema visualization doesn’t?
11-06-2020 10:20 AM
a bug... I suspect.
11-06-2020 10:28 AM
I see, I might open an issue then. Thanks again
All the sessions of the conference are now available online