Hi David!
thanks - nice to meet you
I found another issue when working through the example: extracting categories from the business.json file is inconclusive.
I split the original command in two parts:
from:
CALL apoc.periodic.iterate("
CALL apoc.load.json('file:///dataset/business.json') YIELD value RETURN value
","
MERGE (b:Business{id:value.business_id})
SET b += apoc.map.clean(value, ['attributes','hours','business_id','categories','address','postal_code'],[])
WITH b,value.categories as categories
UNWIND categories as category
MERGE (c:Category{id:category})
MERGE (b)-[:IN_CATEGORY]->(c)
",{batchSize: 10000, iterateList: true});
to:
CALL apoc.periodic.iterate("
CALL apoc.load.json('file:///dataset/business.json') YIELD value RETURN value
","
MERGE (b:Business{id:value.business_id})
ON CREATE SET b += apoc.map.clean(value, ['attributes','hours','business_id','categories','address','postal_code'],[])
",{batchSize: 10000, iterateList: true});
and
CALL apoc.periodic.iterate("
CALL apoc.load.json('file:///dataset/business.json') YIELD value RETURN value
","
WITH value.categories as categories
UNWIND categories as category
MERGE (c:Category{id:category})
",{batchSize: 10000, iterateList: true});
I left out creating the links from categories to businesses, so the second command only creates the categories. After waiting for one hour I quit the command. Unfortunately, there's no error message provided. having reviewed some of the entries manually, there's not thousands of categories in each business, and noting that creating the businesses finished within less than 20s, I conclude that sth is wrong here, but I don't quite get what.
sorry for not being able to provide a more conclusive observation.