# Exclude records that are duplicated

**URL:** <https://forum.cloverdx.com/t/exclude-records-that-are-duplicated/1251>\
**Category:** CloverDX Platform\
**Created:** [August 1, 2013, 12:00am UTC](https://forum.cloverdx.com/t/exclude-records-that-are-duplicated/1251 "2013-08-01T00:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcuendet](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@jcuendet](https://forum.cloverdx.com/u/jcuendet)\
**Post date:** [August 1, 2013, 12:00am UTC](https://forum.cloverdx.com/t/exclude-records-that-are-duplicated/1251/1 "2013-08-01T00:00:00Z")

</div>

Dear team,

I currently try to build the following rule:

I have two Excel readers that read correctly two separated Excel sheets.  
The first sheet contains the following fields:  
- id  
- name  
- description  
The second sheet contains the following fields(not equal except the id)  
- id  
- test 1  
- test 2

I’d like to retrieve rows from the first sheet and to exclude records with id (sheet 1) that are equal to id (sheet 2).

This is an example:

Sheet 1  
id name description  
------------------------  
1 name1 desc1  
2 name2 descr2  
3 name3 descr3  
4 name4 descr4  
5 name5 descr5

Sheet 2  
id test1 test2  
------------------------  
2 toto tata  
3 titi tete

And I’d like to obtain the following table as a result:

Result  
id name description  
------------------------  
1 name1 desc1  
4 name4 descr4  
5 name5 descr5

Thanks for your help!  
Jerome

---

<div class="post-metadata">

**Author:** ![David\_Hlidek](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@David\_Hlidek](https://forum.cloverdx.com/u/David_Hlidek)\
**Post date:** [August 2, 2013, 6:37am UTC](https://forum.cloverdx.com/t/exclude-records-that-are-duplicated/1251/2 "2013-08-02T06:37:14Z")

</div>

Dear Jerome,

you can use following approach:

1. sort both streams of records comming from excels by id  
2. send both streams to [http://doc.cloveretl.com/documentation/ … ction.html](http://doc.cloveretl.com/documentation/UserGuide/index.jsp?topic=/com.cloveretl.gui.docs/docs/dataintersection.html)  
3. define transformation (probably just copying one input record)  
4. on port 0 or 2 (depending on order of inputs - see documentation) you should find data you need

I hope this helps.

---

<div class="post-metadata">

**Author:** ![jcuendet](https://avatars.discourse-cdn.com/v4/letter/j/5e9695/32.png) [@jcuendet](https://forum.cloverdx.com/u/jcuendet)\
**Post date:** [August 2, 2013, 11:17am UTC](https://forum.cloverdx.com/t/exclude-records-that-are-duplicated/1251/3 "2013-08-02T11:17:10Z")

</div>

Absolutely perfect, thanks.  
I just uploaded a screenshot of the solution.  
Regards

- [img\_0159.jpg](https://cdn.cloverdx.com/forum/11679%5F87c442ac7d8937fbc900d1b6e50bed87/img%5F0159.jpg)
