I have a lot of relationships in my Neo4j Database for which I have to rename labels. As the number is quite high (close to 13 million), I am processing parallelly for faster execution. I believe my Cypher Query is correct, but a weird error is getting thrown by the system:
Error:
{
"Invalid input 'CALL': expectedrn "!="rn "%"rn "*"rn "+"rn "-"rn "/"rn "::"rn "<"rn "<="rn "<>"rn "="rn "=~"rn ">"rn ">="rn "AND"rn "AS"rn "CONTAINS"rn "ENDS"rn "IN"rn "IS"rn "OR"rn "STARTS"rn "XOR"rn "^"rn "||" (line 3, column 6 (offset: 83))rn" CALL apoc.refactor.rename.type("OLD_LABEL", "NEW_LABEL",r)"rn ^": 1328
}
I ran this cypher query.
Cypher Query:
CALL apoc.periodic.iterate(
'MATCH ()-[r:OLD_LABEL]->() RETURN r',
'WITH r LIMIT 10000
UNWIND r
CALL apoc.refactor.rename.type("OLD_LABEL", "NEW_LABEL",r)',
{ batchSize: 10000, parallel: true }
)
Is there something I am missing out or doing it wrong? Also what can be other possible ways to do this job?
New contributor
Bhupesh Dewangan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.