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.

Json file with 80 strings

pavloN
Node Clone

I will use amazon servers
How could I tune config database?
Could the query be an improvement?
I will receive a JSON file for about 80k string

CALL apoc.periodic.iterate('
CALL apoc.load.json("${fileName}" ) YIELD value as v RETURN v','     
UNWIND (CASE v.animals.bigP WHEN [] then [null] else v.animals.bigP end) as p         
MERGE (bigP:Animals {name: p})          
WITH v, bigP, v.animals.smallA as smallA          
UNWIND (CASE smallA WHEN [] then [null] else smallA end) as a          
MERGE (smallA:Animals {name: a})          
WITH v, smallA, bigP         
CALL apoc.do.when(v.agentOnly=false,  
"MERGE (childB:ChildBad{name:name})
MERGE (childB)-[:BIG_P]->(bigP)
MERGE (childB)-[:SMALL_A]->(smallA),           
"MERGE (childG:ChildGood{name:name})
MERGE (childG)-[:BIG_P]->(bigP)
MERGE (childG)-[:SMALL_A]->(smallA)",          
{v:v, bigP:bigP, smallA:smallA}) YIELD value RETURN value',     
{ batchSize: 10000, iterateList: true, parallel:true });

2X_7_7af75df954f2efbd33c2b35d3a41bbfca1d60930.png

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online