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

**URL:** <https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751>\
**Category:** Procedures & APOC\
**Tags:** apocperiodiciterate\
**Created:** [September 7, 2020, 10:25am UTC](https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751 "2020-09-07T10:25:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maheshkhanna](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/maheshkhanna/32/13648_2.png) [@maheshkhanna](https://community.neo4j.com/u/maheshkhanna)\
**Post date:** [September 7, 2020, 10:25am UTC](https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751/1 "2020-09-07T10:25:57Z")

</div>

Neo4j Version : 3.5.3  
Neo4j Procedure version : 3.5.0.13

> <https://stackoverflow.com/questions/63729121/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/63731778#63731778>

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

---

<div class="post-metadata">

**Author:** ![Cobra](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cobra/32/35243_2.png) [@Cobra](https://community.neo4j.com/u/Cobra)\
**Post date:** [September 7, 2020, 4:31pm UTC](https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751/2 "2020-09-07T16:31:00Z")

</div>

Hello @maheshkhanna and welcome to the Neo4j community 🙂

Could we see the query?

Regards,  
Cobra

---

<div class="post-metadata">

**Author:** ![maheshkhanna](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/maheshkhanna/32/13648_2.png) [@maheshkhanna](https://community.neo4j.com/u/maheshkhanna)\
**Post date:** [September 25, 2020, 5:06am UTC](https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751/3 "2020-09-25T05:06:30Z")

</div>

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} })

---

<div class="post-metadata">

**Author:** ![Cobra](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cobra/32/35243_2.png) [@Cobra](https://community.neo4j.com/u/Cobra)\
**Post date:** [September 25, 2020, 6:06am UTC](https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751/4 "2020-09-25T06:06:44Z")

</div>

Hello @maheshkhanna 🙂

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

Regards,  
Cobra

---

<div class="post-metadata">

**Author:** ![maheshkhanna](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/maheshkhanna/32/13648_2.png) [@maheshkhanna](https://community.neo4j.com/u/maheshkhanna)\
**Post date:** [September 25, 2020, 6:38am UTC](https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751/5 "2020-09-25T06:38:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Cobra](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/cobra/32/35243_2.png) [@Cobra](https://community.neo4j.com/u/Cobra)\
**Post date:** [September 25, 2020, 6:41am UTC](https://community.neo4j.com/t/apoc-periodic-iterate-fails-the-batch-if-there-is-an-duplicate-data-in-parameter/24751/6 "2020-09-25T06:41:41Z")

</div>

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

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