Hello,
Got a similar question here to: neo4j - Cypher import of CSV with array - Stack Overflow
How do I properly format a homogeneous list of strings in the csv file that is used by the neo4j-admin import tool to create nodes? The docs here describe lists as a possible node property.
According to the documentation on the neo4j-admin import tool, to define an array type, append [ ] to the type. By default, array values are separated by ;. A different delimiter can be specified with --array-delimiter.
So would this be correct then? For example's sake, let's say I have this csv:
id_actor:ID(Person-ID),name:string,age:int,genres:string[],:LABEL
1,"Keanu Reeves",56,"Action;Science Fiction;Romantic Comedy;Humor",Actor
2,"Laurence Fishburne",59,"Action;Romantic Comedy;Science Fiction",Actor
3,"Carrie-Anne Moss",53,"Action;Comedy;Science Fiction;Romantic Comedy;Humor",Actor
I'm following this format from this:
:START_ID,roles:string[],:END_ID,:TYPE
meg,"DeDe;Angelica Graynamore;Patricia Graynamore",tt0099892,ACTED_IN
So, once this finishes loading into Neo4j and I want to retrieve all of the nodes where the actor's genre is "Science Fiction", would I be able to do this?
MATCH(a:Actor)
WHERE "Science Fiction" IN a.genres
RETURN a
This is just a generic example, and it mirrors my use case. Just wanted to ask here before loading millions of nodes connected by nearly a billion relationships.
Thanks