Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
12-01-2020 10:39 AM
have been experimenting with apoc export option. The following code keeps giving an error for which I have no clue what to fix
CALL apoc.export.csv.query("MATCH (t:Toy) WHERE t.ProductName IS NULL","nameless.csv",{})
YIELD rows
RETURN rows
The error is
Failed to invoke procedure `apoc.export.csv.query`: Caused by: org.neo4j.exceptions.SyntaxException: Query cannot conclude with MATCH (must be RETURN or an update clause) (line 1, column 1 (offset: 0))
"MATCH (t:Toy) WHERE t.ProductName IS NULL"
12-01-2020 01:04 PM
Hi @tideon
It states that you need to add return value within your query itself. The apoc.export.csv.query
procedure exports the results of a Cypher query to a CSV file. In your case, Cypher is unable to get the results of query.
Try this:
CALL apoc.export.csv.query("MATCH (t:Toy) WHERE t.ProductName IS NULL return t.ProductName","nameless.csv",{})
YIELD rows
RETURN rows
It should work. Good Luck.
All the sessions of the conference are now available online