Unable to import a csv file with one row of entries

349 views
Skip to first unread message

5785...@gmail.com

unread,
Nov 25, 2016, 7:16:33 AM11/25/16
to Neo4j
Hello there, 
as title suggests, I'm trying to import a file into Neo4j for my thesis project.
Skipping all tries I made, I came up this morning with this goal: importing a really basic csv file to isolate where errors live.

Here my config:
Neo4j community edition 3.0.7 running on Docker
A Pages file with 3 parameters: id, age, sex and just one row like above:

pId;age;sex
70069886;84;M

then file -> export as -> csv
Double checked the csv file both with Atom and csvLint.io

A second csv file with double quotes an commas like this:
"pId","age","sex"
"70069886","84","M"



And here my Cypher queries:

1) this statement creates 371 labels and nodes 
LOAD CSV WITH HEADERS FROM "https://www.dropbox.com/s/d31v82221sjxtgg/5838276a3730300004000037.csv?dl=0" AS line 
CREATE (:Patient{ pID: line.pId, age: line.age, sex: line.sex })

2) LOAD CSV WITH HEADERS FROM "https://www.dropbox.com/s/1ih0qu66v0030f8/provaFoglio.csv?dl=0" AS line FIELDTERMINATOR ';'
CREATE (:Patient{ pID: line.pId, age: line.age, sex: line.sex })

The second one gives me :
At https://www.dropbox.com/s/1ih0qu66v0030f8/provaFoglio.csv?dl=0:198 -  there's a field starting with a quote and whereas it ends that quote there seems to be characters in that field after that ending quote. That isn't supported. This is what I read: ' id="'

Do you have any suggestions?
Many thanks
Alessandro 

Michael Hunger

unread,
Nov 25, 2016, 9:15:00 AM11/25/16
to ne...@googlegroups.com
I think it's a problem with dropbox returning something which is not an csv file

There is at least one redirect and also some cookie thingy going on.

I had good experience with public dropbox files.

Michael

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

5785...@gmail.com

unread,
Nov 27, 2016, 5:15:41 AM11/27/16
to Neo4j
Dear Michael, 
I don't know how to express my gratitude. 
I'm going to work on a thesis discussing surgery outcomes on elderly patients and I proposed to explore a new approach with Neo4j. 
The team asked me a demo and I was at a point to quit because of this Dropbox behavior....Thank you! (importing and querying was just a breeze)
Kind regards
Alessandro
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+un...@googlegroups.com.

Michael Hunger

unread,
Nov 27, 2016, 7:07:22 AM11/27/16
to ne...@googlegroups.com
Glad it worked out, looking forward to your thesis results and any intermediary publications.

Good luck with the work.

Best to join neo4j.com/slack and ask there if you have further questions.

Michael

To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages