I need to import a big JSON file in Neo4J.
Because it should be quite fast I wanted to use apoc.periodic.iterate
My Approach is the following
CALL apoc.periodic.iterate(
"CALL apoc.load.json('sampled.json') YIELD value RETURN value",
"UNWIND value.authors AS author
WITH author
WHERE author.id <> '' AND author.name <> '' |
MERGE (a:Author {id:author.id})
ON CREATE SET a.name = author.name
)",
{batchSize:1000, parallel:false}
)
But this throws the following Error:
(line 3, column 45 (offset: 142))rn"WHERE author.id <> '' AND author.name <> '' |"rn ^": 31
}
I can’t figure out what the problem is and how to fix it.