cancel
Showing results for 
Search instead for 
Did you mean: 

Apoc.import.csv does not import all nodes from csv

muzos07
Node

Hello,
I'm currently running Neo4j version 4.0 and installed plugin APOC 4.0.

  • I'm trying to load bunch of csv files using this CALL string. All csv files are ready in neo4j/plugins folder.
    2X_9_9c5758eee50d7f68e40c245eed88422ee240704b.png

  • However when I run this query, I get this result:

  • So I try to grep this id in file directory, which shows results:


    As you can see, a node with id 17997 is existent and has some relationships.
    Header in processes.csv is id:ID|NodeName:STRING|Characteristics:STRING[]|CommandLine:STRING|Pid:INT|CreationTime:localtime|:LABEL and header in relationships.csv is :START_ID|:END_ID|:TYPE

  • I investigated more and ran only this query:


    which loads only nodes from processes.csv. As you can see, it finished with loading 1306 nodes.

  • But actually in processes.csv are 1667 nodes, here is proof (number of lines in file minus one for header):
    2X_7_7534afe4921a4d1533885057ff82e5a685c633f2.png

So it's obvious, that the first problem is caused by some of the nodes not loaded properly.
My question is why are they not loaded and how come that procedure does not return any errors.

Thanks, Petr

4 REPLIES 4

ameyasoft
Graph Maven

All the .csv file must reside in imports folder and not plugins folder.

muzos07
Node

Im sorry, I meant neo4j/import folder. All csv files truly are in import folder.
Otherwise all those 1306 would't be imported.

Hi @muzos07,
Could you check if you have duplicate nodes in the file and difference is same?

muzos07
Node

I'm forced to close this thread since I'm not currently able to replicate this problem. I accidentally deleted original dataset. I will post here if I encounter this problem again

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.