1
votes

I have executed following query to load CSV file and store into Neo4j graph. I framed the query using APOC stored procedures in Neo4j. But, it is showing an error. The query is as:

CALL apoc.load.csv("file:///Product_CSV.csv",{sep:","}) YIELD al
CALL apoc.create.node(['Product'], ProductTitle:al.Product_Title,ProductType:al.Product_type}) YIELD node
RETURN count(*);

The error is:

Unknown procedure output: al (line 1, column 71 (offset: 70)) "CALL apoc.load.csv("file:///Product_CSV.csv",{sep:","}) YIELD al CALL
poc.create.node(['Product'], ProductTitle:al.Product_Title,ProductType:al.Product_type}) YIELD node RETURN count(*);"

Anybody can help me out of this?

1

1 Answers

1
votes

Take a look in the apoc.load.csv procedure signature:

CALL apoc.load.csv('url',{sep:";"}) YIELD lineNo, list, map

This procedure does not produces an al output as specified in your query.

Change your query to:

CALL apoc.load.csv("file:///Product_CSV.csv",{sep:","}) YIELD map
CALL apoc.create.node(['Product'],{ProductTitle:map.Product_Title,ProductType:map.Product_type}) YIELD node
RETURN count(*);