cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo.ClientError.Procedure.ProcedureNotFound

CALL apoc.periodic.iterate("
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.
 
 
 
2 ACCEPTED SOLUTIONS

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’. 

View solution in original post

Hello @IchsanALi 😊

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

 

View solution in original post

7 REPLIES 7

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’. 

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” ‘

Hello @IchsanALi 😊

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

 

done, thanks

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online