Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-31-2021 04:35 AM
Hello Everyone,
I try to import CSV files but some fields contains specials characters such as linebreak and carriage return transformed ( \n and \r). But when I import data into Neo4J, this special character is not transformed into Neo4j and stay with \n and \r.
How can I do to have carriage return and linebreak in my property value in neo4j ?
Regards,
Brice
09-01-2021 07:04 AM
Could you provide a small example file and the cypher you used? I'm not sure what is in your file, or the options you use with LOAD CSV, or what you desire as a result. Do you have \r\n inside some of the column data? and it is being used as the end of line? Are the columns quoted? (can they be?)
09-01-2021 07:47 AM
Hello Joel,
thanks for your answer.
This is an example for a line : "A_V=::::::::::::::A","AA","A003","WIP","A350","R","1","0","VAUK-TEDG","FT4 - FLAP LEVER\r\n","A-UK"
I use in command line :
$NEO4J_HOME/bin/neo4j-admin import
--skip-duplicate-nodes=true
--skip-bad-relationships=true \
Regards,
Brice
09-01-2021 09:48 AM
Are you specifying any other parameters?
Specifically did you specify a [--quote=] character?
I think the default is double quote, and I just verified that I am loading double quoted data from tsv files (column delimiter tab), and I am not providing a --quote parameter (so it does defaults to double quote, at least in recent versions...) I am sure that I have \n in some of my data, but I am not sure if any of them are \r\n pairs.
My load looks like this
docker exec -t \
${EPHEMERALCONTAINER} bin/neo4j-admin import \
--database="${CONTAINER}" \
--verbose \
--skip-bad-relationships=true \
--skip-duplicate-nodes=true \
--ignore-empty-strings=true \
--normalize-types=true \
--trim-strings=false \
--delimiter "\t" \
--high-io=true \
--report-file=importreport.txt \
All the sessions of the conference are now available online