mage icon indicating copy to clipboard operation
mage copied to clipboard

Calling a procedure inside periodic.iterate returns "query failed"

Open karmenrabar opened this issue 1 year ago • 0 comments

Is calling a query module create.node inside a periodic.iterate supported? Or more generally, can an argument of a query module also be a query module?

Running the following query returns: Query failed: periodic.iterate: Error while executing periodic iterate!

CALL periodic.iterate(
  'WITH [1,2,3] as nodes UNWIND nodes as node return node',
  'CALL create.node(["Person"], {name: "A"}) YIELD node RETURN node',
  {batch_size:2000}
) YIELD success
return success

But, running this query works well.

CALL periodic.iterate(
  'WITH [1,2,3] as nodes UNWIND nodes as node return node',
  'CREATE (p:Person {name: "A"})',
  {batch_size:2000}
) YIELD success
return success

Source and context: discord

karmenrabar avatar Jan 19 '24 10:01 karmenrabar