Hi
First time poster here.
I'm struggling with the syntax required for apoc.periodic.iterate. I'm using:
CALL apoc.periodic.iterate(
'LOAD CSV WITH HEADERS FROM $source_file AS row',
'WITH row.status as Status',
'RETURN Status LIMIT 10',
{batchSize:10000, iterateList:True, parallel:true})
and am getting the following error:
Neo.ClientError.Statement.SyntaxError: Procedure call does not provide the required number of arguments: got 4 expected 3.
Procedure apoc.periodic.iterate has signature: apoc.periodic.iterate(cypherIterate :: STRING?, cypherAction :: STRING?, config :: MAP?) :: batches :: INTEGER?, total :: INTEGER?, timeTaken :: INTEGER?, committedOperations :: INTEGER?, failedOperations :: INTEGER?, failedBatches :: INTEGER?, retries :: INTEGER?, errorMessages :: MAP?, batch :: MAP?, operations :: MAP?, wasTerminated :: BOOLEAN?, failedParams :: MAP?
meaning that it expects 3 arguments of type STRING?, STRING?, MAP?
Description: apoc.periodic.iterate('statement returning items', 'statement per item', {batchSize:1000,iterateList:true,parallel:false,params:{},concurrency:50,retries:0}) YIELD batches, total - run the second statement for each item returned by the first statement. Returns number of batches and total processed rows (line 13, column 1 (offset: 386))
"{batchSize:10000, iterateList:True, parallel:true})"
The query without apoc.periodic.iterate runs as expected:
LOAD CSV WITH HEADERS FROM $source_file AS row
WITH row.status as Status
RETURN Status LIMIT 10
I was following the advice in https://community.neo4j.com/t/struggling-with-apoc-periodic-iterate-in-a-big-query-from-python-code/3165 but to no avail.
Any help greatly appreciated.
Kind regards