Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-21-2020 09:33 PM
I am trying to make a graph data that tracks the location of vehicles and their trip number. This dataset has a pickup location and various drop-off locations. This data has maximum four drop-off locations. Is there a way to make this data import easier? Like instead of using t1, t2, t3, and t4, I should use a single variable to avoid repeating setting of properties since they have the same properties. Or a way to make the same connection from one location to another without needing to draw the entire pathway. Thank you
12-22-2020 09:45 AM
Can you make it into a JSON file? I think that will simplify matters a lot. And if you don't quote the numbers in the JSON file, they will be imported as number (I believe/hope.)
See my answer here about importing a JSON file:
12-22-2020 10:01 AM
Try adding the trip_number and plate_no properties to Location nodes:
MERGE (d1:Location {name: line.dropoff_1, tripnumber: toInteger(line.trip_number, platenumber: line.vehicle_plate_no)})
MERGE (p)-[:TRIP]->(d1)-[:TRIP]->(d2)....
12-22-2020 02:54 PM
I needed the properties to be in the relationship because nodes here are treated as actual locations. I get it though, I can set properties using map style
All the sessions of the conference are now available online