Nathan Horrigan
Nathan Horrigan

Reputation: 813

What does SyntaxError, "Unknown procedure output: `node`" mean?

I'm following multiple tutorials and all demonstrate the same Cypher query so it must be correct but I'm getting following error:

Neo.ClientError.Statement.SyntaxError Unknown procedure output: node

Code:

call spatial.addWKTLayer('geom', 'wkt')
------- THEN --------
MATCH (v:Venue) WITH collect(v) as venues
CALL spatial.addNodes('geom', venues) 
YIELD node
RETURN count(*)

Upvotes: 2

Views: 2510

Answers (2)

Nathan Horrigan
Nathan Horrigan

Reputation: 813

Taken from Github Issue (Correct Answer):

Looking at the code I notice that the addNodes procedure changes signature last November to return a count of nodes added, instead of a stream of nodes added. This was, I believe, in support of using the bulk-load feature for adding nodes much faster, and therefor also supporting much larger numbers of nodes. Since you are passing in the nodes, there is also no real value in getting the node returned.

What should work now would be:

call spatial.addWKTLayer('geom', 'wkt')
------- THEN --------
MATCH (v:Venue) WITH collect(v) as venues
CALL spatial.addNodes('geom', venues) 
YIELD count
RETURN count

If you really want to yield the node, add one at a time with:

call spatial.addWKTLayer('geom', 'wkt')
------- THEN --------
MATCH (v:Venue)
CALL spatial.addNode('geom', v) 
YIELD node
RETURN count(*)

Github Issue ==> Link to Issue

Upvotes: 5

InverseFalcon
InverseFalcon

Reputation: 30407

Usually that means you're YIELDing the wrong variable from a procedure call. Try checking the signature of the procedure you're calling for what variables are yielded:

call dbms.procedures() yield name, signature
where name contains 'spatial.addNodes'
return name, signature

Upvotes: 4

Related Questions