How do I split the data in the column while loading in neo4j using neo4j-admin import? parsing issue

Hello all,
I have a node and relationship csv. In relationship, I have a column where I need to split the column on a pipe. I tried using --array-delimiter = '|' but It doesn't split the data. My data looks like

node.csv

identifier:ID,name:LABEL
1,apple
2,ball
3,cat
rel.csv

source_ids:START_ID,target_ids:END_ID,type:TYPE,data
1,2,connection,
2,3,relation,test1|test2
3,1,connection,test1
1,3,relation,test4|test3|tet6

I used the code
neo4j-admin import --verbose --ignore-extra-columns=true --array-delimiter "|" --nodes C:/Users/Sam/Documents/node.csv --relationships C:/Users/Sam/Documents/rel.csv.

The result I get is :

{
 "data": "test4|test3|tet6"
}

what I want is :

{
  "data": ["test4","test3","tet6"]
}

I am using Neo4j 4.0.0 community.

I think you need to do something like:

  1. Change import directory
    dbms.directories.import=import
    to
    dbms.directories.import=ABSOLUTE_DIRECTORY_PATH

and run Cypher like this, using the split function String functions - Neo4j Cypher Manual

LOAD CSV WITH HEADERS FROM "file:///node.csv" AS row
CREATE (node:Label {data: split(row.data, '|')} )

You might have to do a second pass to create the relationships, which will require something like a MATCH for the node and then separate CREATE/MERGE for the relationship.

I hope that helps.

Default data type is string for data. May be you can try changing this line to

source_ids:START_ID,target_ids:END_ID,type:TYPE,data:string[]