I need to import a CSV file and create a node from each record. I am using APOC because supposedly I can use a column in the CSV file to define each node type as the nodes are created.
This doesn't work:
CALL apoc.load.csv('FILE:///C:/Temp/Test/Test/Neo4jTest/import/Neo4j_AttributeProvenance.csv',{sep:","}) YIELD map
CALL apoc.create.node(['map.AttributeName'], {key:['map.NodeID']}) return count(*)
This is the error:
Procedure call inside a query does not support naming results implicitly (name explicitly using `YIELD` instead) (line 2, column 1 (offset: 124))
"CALL apoc.create.node(['map.AttributeName'], {key:['map.NodeID']}) return count(*)"
I also tried this syntax:
CALL apoc.load.csv('FILE:///C:/Temp/Test/Test/Neo4jTest/import/Neo4j_AttributeProvenance.csv',{sep:","}) YIELD map
CALL apoc.create.node(map.AttributeName, {key:map.NodeID}) return count(*)
Can you try with this :
I just add the
YIELD
stuff on the create node.Cheers
You forgot a
YIELD node
after callapoc.create.node
procedure. Try this: