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.

Large scale export with apocs

Hi Michael,

is it possible to use apoc.export.csv.query inside apoc.periodic.iterate ? I'm trying to run a jaccard query within apoc.export.csv.query and wanting to export files out in batches with apoc.periodic.iterate. I've been trying but getting syntax error and not sure if it's possible in the first place.

The idea is something like this :

CALL apoc.periodic.iterate('MATCH (s:IdStateAG)-[:HAS_ENT_2019_12]->(e:EntitlementAG) 
	WITH {item:id(s), categories: collect(id(e))} as entitlements 
	WITH collect(entitlements) as data RETURN data',
	'CALL apoc.export.csv.query('CALL algo.similarity.jaccard.stream(data, {similarityCutoff: 0.5}) 
	 YIELD item1, item2, count1, count2, intersection, similarity 
	 RETURN algo.getNodeById(item1).id + '-' + '2019-12' AS `:START_ID(IdentityAG-ID)`, algo.getNodeById(item2).id + '-' + '2019-12' AS `:END_ID(IdentityAG-ID)`, similarity AS weight, 'SIM_50_2019_12' AS `:TYPE` ORDER BY similarity', '/AG/AG-SIM-50-2019-12' + $_count + '.csv', {quotes: false})', {batchSize:10000, iterateList:true})

Please let me know if you have any recommendations. thanks.

0 REPLIES 0