So, for my bachelor thesis I have to import a distance matrix in Neo4j and got the following message:

This query builds a cartesian product between disconnected patterns.

my data set is destributed into two files, one for nodes one for edges.

Nodes:

ID; Name

1;"AANAUSF000000AG0149"

2;"AANAUSF000000AG0150"

3;"AANAUSM000000000Z24"

4;"AANAUSM000000000Z28"

5;"AANAUSM000000AG0152"

Edges:

startID;endID;distance

1;2;17

1;3;21

1;4;23

1;5;30

2;3;24

2;4;28

2;5;35

3;4;18

3;5;27

4;5;17

`starID `

and `endID`

refere to the same kind of nodes and `distance`

is the value how far apart those samples are from each other. The relationship file represents a (n-1) x (n-1) matrix in which symmetric pairings are not significant ( [a,b] == [b,a] ) as the diagonal , which is always 0 ( [a,a] == 0 ). The final matrix represents alsmot 60 million relations and many of them could have the same distance like [1,2] and [4,5].

I tried the following instruction, leading me to the inevitable cartesian warning:

LOAD CSV WITH HEADERS FROM "file:///Kanten.csv" AS row

FIELDTERMINATOR ';'

Match (c1:Cow {id:toInteger(row.startID)}), (c2:Cow{id:toInteger(row.endID)})

CREATE (c1)-[d:DISTANCE]->(c2);

here is also my plan

My question is now: Is there a work around for this problem or is this the end for my thesis?

I appreciate every advice I can take!