I'm trying to create nodes with one set label (:object) and two additional labels that are based on values in the following CSV file:
| Object_ID | Classification | Hierarchy_name | Object_type |
|---|---|---|---|
| O0010 | visual_works | sculpture | sculpture |
| O0011 | components | book_jackets | book |
I thought it would be possible to add dynamic labels based on the values in the spreadsheet using the $ expression, but I cannot find information about how to use this in relation to loading information from a CSV file.
Currently, my faulty script looks like this:
LOAD CSV WITH HEADERS FROM 'file:///classification.csv' AS row
CREATE (o:object:$(row.Hierarchy_name):$(row.Classification){ID: row.Object_ID, Type: row.Type});