Hello All I'm new to Neo4j, I'm trying to learn Neo4j. This example I have chosen is process of resolving issue related to Mobile repair.
Below shown are 3 columns for Operation1&2 (which are done by Operator ID A,B,C..etc) and Time for both operations to complete for particular mobile issue to be resolved
(OPER_1,OPER_2,Time)
(A, A, 6)
(A, A, 8)
(A, B, 3)
(B, C, 4 )
(C, D, 6)
(D, E, 9)
I wanted to create a graph with nodes as Operator & time on relations as shown below:
LOAD CSV WITH HEADERS FROM "file:///C:/xyz.csv" AS line
CREATE (n:Oper1 {,OperId:line.OPER_1})
CREATE (m:Oper2 {OperId:line.OPER_2})
WITH n,m
CREATE (n) -[:TO {TimeUsed: line.Time} ]-> (m)
But it creating something like this:
A--6--->A, A---8--->A,A--3--->B, B--4--->C, C---6--->D, D---9--->E all relations are separately generated.
it appears your result created 6 pairs where each node points to another node but what you wanted was one long path? is that correct?
If so change the CREATE to a MERGE and retry.
And so with Neo4j 4.2.5 and with a csv defined as
In the context of my application, I wanted to depict in graph the process of how mobile traversed for repair. I might have modeled it wrong. Thanks for the inputs, I have corrected it now.