Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
05-07-2021 02:08 PM
I am looking at this graph embedding tutorial, as shown below:
https://neo4j.com/developer/graph-data-science/applied-graph-embeddings/
In the graph creation cypher script, there is only one node type, Place:
CREATE CONSTRAINT ON (p:Place) ASSERT p.name IS UNIQUE;
:auto USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM "https://github.com/neo4j-examples/graph-embeddings/raw/main/data/roads.csv"
AS row
MERGE (origin:Place {name: row.origin_reference_place})
SET origin.countryCode = row.origin_country_code
MERGE (destination:Place {name: row.destination_reference_place})
SET destination.countryCode = row.destination_country_code
MERGE (origin)-[eroad:EROAD {number: row.road_number}]->(destination)
SET eroad.distance = toInteger(row.distance), eroad.watercrossing = row.watercrossing;
It created only one node type, Place without Country, but in the tutorial text, and the schema visualization, it shows there are two node types, Place & Country and a relationship, place_in_country, as shown below:
How could it be possible based on the cypher script? I created the graph using the script and get the schema visualization as below, which is consistent with the script:
So is the schema diagram in the tutorial not quite right? Just curious about this.
Solved! Go to Solution.
05-07-2021 03:14 PM
OK. I got this updated cypher script which is consistent with the tutorial text:
05-07-2021 03:14 PM
OK. I got this updated cypher script which is consistent with the tutorial text:
All the sessions of the conference are now available online