cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How to resolve [Neo.DatabaseError.Statement.ExecutionFailed]: Connection reset

jcct100
Node Clone

I am trying to import a CSV file (100k rows) and I am using the neo4j community version 4.4.5.

It is taking a very long time to import, and I got this error below after it is trying to import for 2 hours:

[Neo.DatabaseError.Statement.ExecutionFailed]: Connection reset

How can I increase the speed of my import? And also getting rid of that error above?

Here is my code:

 

 

 

create index on :Place(uniqueAddressReference); :auto USING PERIODIC COMMIT
LOAD CSV WITH HEADERS
FROM 'https://docs.google.com/spreadsheets/d/e/2PACX-1vQkG2TRn96N5sVRpt4AoLNIRuFDs1Dg_8URmP2_eSs8bS7I2jsjhfr5dknSn0IgH71OoLIar8DbdU5k/pub?gid=1064820567&single=true&output=csv'
AS row
MERGE (p:Place {uniqueAddressReference: toInteger(row.uniqueAddressReferenceNumber)})
ON CREATE SET
p.fullAddress = CASE row.formated_full_address WHEN "" THEN null ELSE row.formated_full_address END, p.isHospitality = true, p.primaryDescriptionText = CASE row.primaryDescriptionText WHEN "" THEN null ELSE row.primaryDescriptionText END, p.firmsName = CASE row.firmsName WHEN "" THEN null ELSE row.firmsName END, p.houseNumberOfName = CASE row.formated_numberOfName WHEN "" THEN null ELSE row.formated_numberOfName END, p.subStreetLevelLineThree = CASE row.formated_subStreetLevelThree WHEN "" THEN null ELSE row.formated_subStreetLevelThree END, p.subStreetLevelLineTwo = CASE row.formated_subStreetLevelTwo WHEN "" THEN null ELSE row.formated_subStreetLevelTwo END, p.subStreetLevelLineOne = CASE row.formated_subStreetLevelOne WHEN "" THEN null ELSE row.formated_subStreetLevelOne END, p.street = CASE row.formated_street WHEN "" THEN null ELSE row.formated_street END, p.town = CASE row.formated_town WHEN "" THEN null ELSE row.formated_town END, p.postalDistrict= CASE row.formated_postalDistrict WHEN "" THEN null ELSE row.formated_postalDistrict END, p.county = CASE row.formated_county WHEN "" THEN null ELSE row.formated_county END, p.postCode = CASE row.postCode WHEN "" THEN null ELSE row.postCode END, p.totalArea = CASE row.totalArea WHEN "" THEN null ELSE row.totalArea END
RETURN p

 

 

 

 

1 ACCEPTED SOLUTION

Remove the 'return' statement.  It took 25 seconds to run without it.  Count after execution. 

Screen Shot 2022-12-29 at 10.14.30 AM.png

View solution in original post

3 REPLIES 3

Remove the 'return' statement.  It took 25 seconds to run without it.  Count after execution. 

Screen Shot 2022-12-29 at 10.14.30 AM.png

jcct100
Node Clone

thank you! Before was it returning each row ?

Yes, and the entire node, which includes the Id, labels, and all properties.  It must have been a lot. 

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online