neo4j / apoc

Apache License 2.0
84 stars 27 forks source link

Data format discrepancy with and without using the option bulkImport: true #577

Open smallcat9603 opened 7 months ago

smallcat9603 commented 7 months ago

I used apoc.export.csv.all() to export the graph data to local CSV files, but I found the data format discrepancy with and without using the option bulkImport: true. When not using bulkImport: true, the node properties are saved in an all-in-one CSV file, e.g, a string list ["a", "b", "c"]. When using bulkImport: true, the node properties are saved to multiple CSV files categorized by node labels. But in this case the string list becomes [a, b, c]. The quotes disappeared. This will introduce errors when directly using apoc.import.csv() to read data from these CSV files.

It seems that apoc.import.csv() works well with the data generated by apoc.export.csv.all() with the option bulkImport: true, except for the quote issue in the CSV files.

loveleif commented 7 months ago

Thanks for reporting this @smallcat9603 and sorry for the inconvenience! I agree, this looks wrong. I have created a ticket in our internal bug tracker. We'll get back here with more information when it has been fixed.