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.

Change delimiter type when exporting data into csv

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

2 REPLIES 2

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.

When in doubt, always check the source code

It seems that the correct parameter name is actually delim judging by this code: