Within the action portion of an apoc.period.iterate I am performing an apoc.export.json.query.
I want the resulting filename to iterate along with the periodic.iterate batches.
The method I've used so far is making the export filename something like this:
WITH "my cypher query" as the query,
"CALL apoc.export.json.query('UNWIND $_batch as row with row.cid as cid MATCH (....','//subgraph//customer_export_'+$_count+'.json',{format:'plain',params:{_batch:$_batch}}) yield file RETURN file" as the action
CALL apoc.periodic.iterate(thequuery,theaction,{batchsize:100}) YIELD batches,committedOperations,failedBatches,errorMessages
RETURN batches,committedOperations,failedBatches,errorMessages
$_count doesn't seem like the correct variable to be using... is there an equivilant that returns the iterating BATCH count, 0,1,2,3 that I can use to increment the output filename string from INSIDE the apoc.periodic.iterate function?