Skip to content

Instantly share code, notes, and snippets.

@langsdlc
Created July 14, 2016 20:05
Show Gist options
  • Save langsdlc/06eb81ffc3f9259b4ba25084862dd71a to your computer and use it in GitHub Desktop.
Save langsdlc/06eb81ffc3f9259b4ba25084862dd71a to your computer and use it in GitHub Desktop.
cypher query load relationsips- mapping access
LOAD CSV WITH HEADERS FROM "https://gist.githubusercontent.com/CliffordAnderson/148c63407ce61c2ecabd456f3e1d15b4/raw/fb50b0b1e02e076df0387ccffb343b4acd0dc74a/Test_Network-cleaned-rows.csv" AS csvLine
MATCH (from:Waypoint { name: toInt(csvLine.FromPoint)}), (to:Place { name: toInt(csvLine.ToPoint)})
MERGE (from)-[:Path { distance: toFloat(csvLine.DistanceFt), entrance: toINT(csvLine.Entrance), surface: toINT(csvLine.Surface), path_type: toINT(csvLine.Path_Type), stairs: toINT(csvLine.Stairs), description: STR(csvLine.Description)}]->(to)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment