Created
July 11, 2018 08:53
-
-
Save lassewesth/2d6402a43ee1126b3452ba4d2a9aa4bd to your computer and use it in GitHub Desktop.
A Cypher statement that imports E-road data from a CSV
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USING PERIODIC COMMIT 1000 | |
LOAD CSV WITH HEADERS FROM "https://gist.githubusercontent.com/lassewesth/634281cced11147432cf232a2c36e080/raw/1ed1f4fe4ca4c8092bbc8557addd1e5d87316833/eroads.csv" AS row | |
MERGE (origin:ReferencePlace {name: row.origin_reference_place, country_code: row.origin_country_code}) | |
MERGE (destination:ReferencePlace {name: row.destination_reference_place, country_code: row.destination_country_code}) | |
CREATE (origin)-[:EROAD {road_number: row.road_number, distance: row.distance, watercrossing: row.watercrossing}]->(destination) | |
WITH "Århus" AS homeTown | |
MATCH (aarhus:ReferencePlace {name: homeTown}) | |
RETURN aarhus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment