Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
07-15-2020 02:10 AM
Hello,
is it possible to change delimiter type when exporting data from Neo4j into csv file?
My current export query use the comma "," as delimiter between the requested information (EntityLabels and Entity):
<CALL apoc.export.csv.query("MATCH (e:entity) WHERE e.name = 'Daniel' RETURN labels(e) AS EntityLabels, e.name AS entity", "results.csv", {})>
However I would need to use vertical bar "|" (as a delimiter) instead. I tried to run the following query but it did not help:
<CALL apoc.export.csv.query("MATCH (e:entity) WHERE e.name = 'Daniel' RETURN labels(e) AS EntityLabels, e.name AS entity", "results.csv", {d: '|'})>
Can I kindly ask you if it is possible to export data from Neo4j using a different delimiter? If so, are there any suggestions how to run such query?
Please note I am currently using Neo4j 4.0.4.
Thank you very much for any help!
Daniel
07-15-2020 05:48 AM
I am not entirely sure. Have you checked the documentation here? I didn't see anything about changing the file delimiter.
Is there a particular reason |
works better than ,
? I am just curious as to why you would prefer that separator.
07-15-2020 06:14 AM
When in doubt, always check the source code
It seems that the correct parameter name is actually delim
judging by this code:
All the sessions of the conference are now available online