You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The command apoc.export.csv.all("test.csv", {useTypes: true, bulkImport: true}) should correctly add Array type to Array properties for use with neo4j-admin import command.
E.g. the header in exported .csv file should be testList:datatype[] to indicate an array. The value column should use arraydelimiter like a;b;c instead of [a,b,c].
More info on neo4j-admin import data types: https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin/neo4j-admin-import/#import-tool-header-format-properties
Actual Behavior (Mandatory)
The command apoc.export.csv.all("test.csv", {useTypes: true, bulkImport: true}) exports Array properties as String type.
e.g. the header in exported .csv file does not have an explicit type (defaults to string) and the value column is not correctly formatted for use with neo4j-admin import.
See that header and column value is not correctly formatted in the .csv file
//Insert here a set of Cypher statements that helps us to reproduce the problem
CREATE (n:Test {strList: ["a", "b"]});
CALL apoc.export.csv.all("test.csv", {useTypes: true, bulkImport: true});
There is also an issue with quotes being removed from string values.
e.g. if you have a property stringWithQuote: 'this is " a test', the quote in the string is replaced with a space in the export. So the resulting string value in the csv is
this is a test
Edit: the quote problem is also related to the bulkImport: true config. Without it quotes in values are escaped correctly
Edit2: I see the quote issue is also fixed by vga91#76
Expected Behavior (Mandatory)
The command
apoc.export.csv.all("test.csv", {useTypes: true, bulkImport: true})
should correctly add Array type to Array properties for use withneo4j-admin import
command.E.g. the header in exported
.csv
file should betestList:datatype[]
to indicate an array. The value column should use arraydelimiter likea;b;c
instead of[a,b,c]
.More info on
neo4j-admin import
data types: https://neo4j.com/docs/operations-manual/current/tools/neo4j-admin/neo4j-admin-import/#import-tool-header-format-propertiesActual Behavior (Mandatory)
The command
apoc.export.csv.all("test.csv", {useTypes: true, bulkImport: true})
exports Array properties as String type.e.g. the header in exported
.csv
file does not have an explicit type (defaults to string) and the value column is not correctly formatted for use withneo4j-admin import
.How to Reproduce the Problem
apoc.export.csv.all("test.csv", {useTypes: true, bulkImport: true})
.csv
fileHow to Fix the Problem
Rebase and merge this pull request: vga91#76
Specifications (Mandatory)
Currently used versions
Versions
The text was updated successfully, but these errors were encountered: