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.

Apoc.periodic.iterate fails the batch if there is an duplicate data in parameter

Neo4j Version : 3.5.3
Neo4j Procedure version : 3.5.0.13

I would like to see some answers for the above from developers here

5 REPLIES 5

Hello @maheshkhanna and welcome to the Neo4j community

Could we see the query?

Regards,
Cobra

call apoc.periodic.iterate(‘ UNWIND {propertyList} as property RETURN property.owner as owner ,property.properties as properties ","MERGE (own:MAN {id:owner.key}) SET own += owner FOREACH (property in properties | MERGE (prop:PROPERTY {id:property.key}) SET prop += property MERGE (own)-[:OWNS]->(prop) )”, { batchSize:500 , parallel:true,retries:0 ,iterateList :true ,failedParams :50 , params:{propertyList : $propertyList} })

Hello @maheshkhanna

I think you are complicating things here, what are you trying to achieve?

Regards,
Cobra

my data will be like this

  • owner can have multiple properties

  • We are storing the properties owned by him by connecting the PROPERTY node to MAN node

Since the data set is very huge it can have duplicate properties for other owners too

Can you share the schema of your database? CALL db.schema.visualization()

Can you give me an example of what is in {propertyList}?

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online