I am planning to load train schedule and stations into Neo4j from CSV.
Source Data
TrainNo TrainName SEQ StationCode Arrival Departure Distance
1 TN_1 1 S1 8 9 0
1 TN_1 2 S2 10 11 10
1 TN_1 3 S3 12 1 15
1 TN_1 4 S4 3 4 15
2 TN_2 1 S1
2 TN_2 2 S2
2 TN_2 3 S5
2 TN_2 4 S6
2 TN_2 5 S7
2 TN_2 6 S8
I need to build nodes and relationship like this
S1--(TrainNo,TrainName,SEQ,Arrival,Depature,Distance)--S2--(TrainNo,TrainName,SEQ,Arrival,Depature,Distance)--S3--(TrainNo,TrainName,SEQ,Arrival,Depature,Distance)-S4
Basically, the TrainNo, TrainName,Seq, Arrival, Depature and Distance will be on the relationships, and the same relationships will form a route between the stations.
Neo4j - 3.5
TrainNo, TrainName, SEQ, StationCodeFrom, StationCodeTo, Arrival, Departure, Distance
. That way all rows are independent from each other. With your current structure, rows are dependent upon other rows, so for example by looking only at row 1 there is no way to tell what the To station is, it requires information from other rows. If you can please create a better CSV file. – InverseFalcon