I am trying to create a neo4j graph database from the below csv:
I am finding it hard to figure out the different nodes and relationships.
I tried the below code but the database was not connected like it needs to be.
LOAD CSV WITH HEADERS FROM 'file:///dummy.csv' AS row
MERGE (a: Airport {depatureId: row.Origin, arrivalId: row.Dest})
MERGE (f: Flight {flightId: row.Flight_num, distance: row.Distance, Flightdate: row.Date, Flightdelay: row.Total_delay, Airline: row.Carrier_code})
MERGE (a)-[r1:HAS_FLIGHT]->(f)
MERGE (f)-[r2:FLYING_TO]->(a)
Another attempt
LOAD CSV WITH HEADERS FROM 'file:///dummy.csv' AS row
MERGE (o: Origin {origin_airportId: row.Origin})
MERGE (d: Destination {destination_airportId: row.Dest})
MERGE (f: Flight {flightId: row.Flight_num, distance: row.Distance, Flightdate: row.Date, Flightdelay: row.Total_delay, Airline: row.Carrier_code})
MERGE (o)-[r1:FLYING_FROM]->(f)
MERGE (f)-[r2:FLYING_TO]->(d)
Any ideas or suggestions would be much appreciated, thanks.