Neo.ClientError.Procedure.ProcedureNotFound

CALL apoc.periodic.iterate("

LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/iamvarol/blogposts/main/medium/tennis/data.csv' AS row

WITH row, split(row.score, ' ') AS matchSets

WITH *, size(matchSets) AS setSize,

     row.tourney\_name + '\_' + row.tourney\_year + '\_' + 'WTA' AS tournament\_id, 

     row.tourney\_name + '\_' + row.tourney\_year + '\_' + 'WTA' + '\_' + row.match\_num AS matchId

RETURN *

"

,

"

MERGE (t:Tournament {id: tournament_id})

ON CREATE SET t.name = row.tourney_name,

          t.year \= toInteger(row.tourney\_year),

          t.type \= 'wta'

MERGE (m:Match {id: matchId})

ON CREATE SET m.round = row.round,

          m.score \= row.score,

          m.year \= toInteger(row.tourney\_year)

MERGE (p1:Player {id: row.winner_id})

ON CREATE SET p1.name = row.winner_name,

          p1.gender \= 'Female',

          p1.hand \= row.winner\_hand,

          p1.ioc \= row.winner\_ioc

MERGE (p2:Player {id: row.loser_id})

ON CREATE SET p2.name = row.loser_name,

          p2.gender \= 'Female',

          p2.hand \= row.loser\_hand,

          p2.ioc \= row.loser\_ioc

MERGE (p1)-[:MATCH_WINNER]->(m)

MERGE (p2)-[:MATCH_LOSER]->(m)

MERGE (m)-[:IN_TOURNAMENT]->(t)

WITH *

UNWIND range(0, setSize-1) AS setNumber

FOREACH (set IN matchSets |

MERGE (s:Set {id: matchId + '\_' + setNumber + 1})

ON CREATE SET s.score \= matchSets\[setNumber\],

              s.number \= setNumber +1

MERGE (s)-\[:IN\_MATCH\]->(m)

)

"

,

{batchSize:100, parallel:false}

)

Neo.ClientError.Procedure.ProcedureNotFound

There is no procedure with the name `apoc.periodic.iterate` registered for this database instance. Please ensure you've spelled the procedure name correctly and that the procedure is properly deployed.

done, thanks
(migrated from khoros post Solved: Re: Neo.ClientError.Procedure.ProcedureNotFound - Neo4j - 58762)

Hello @IchsanALi :blush:

The APOC plugin must be installed on your database and your neo4j.conf must be configured like this:

dbms.security.procedures.unrestricted=jwt.security.*,apoc.*,gds.*
dbms.security.procedures.allowlist=apoc.*,gds.*

Regards,
Cobra

I'm using Neo4j version 4.4.4

The procedure name matches what is in the apoc documentation, so it is spelled correctly. I have to ask the obvious question “is apoc installed?”

also, I don’t think you need the unwind and the forEach loop. I believe you can delete the forEach and just leave the merge following the unwind and the results will be the same. This is because there is nothing in the forEach loop referencing the loop variable ‘set’.

thks
(migrated from khoros post Solved: Re: Neo.ClientError.Procedure.ProcedureNotFound - Neo4j - 58762)

I'm using APOC version 4.4.0.3

Do you see it in the browser when you execute ‘show procedures where name starts with “apoc” ‘