# Duplicate records

**URL:** <https://forum.cloverdx.com/t/duplicate-records/833>\
**Category:** CloverDX Platform\
**Created:** [March 9, 2011, 12:00am UTC](https://forum.cloverdx.com/t/duplicate-records/833 "2011-03-09T00: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:** [March 9, 2011, 12:00am UTC](https://forum.cloverdx.com/t/duplicate-records/833/1 "2011-03-09T00:00:00Z")

</div>

Hi,

Currently I’d like to duplicate records without using copy.  
In my example, I have 13 records that I’d like to multiply by 10’000. In order to get 130’000 records.  
I cannot do it in the input file as it’s an Excel file and doesn’t support more than 65K lines.

What do you suggest?  
Thanks

---

<div class="post-metadata">

**Author:** ![avackova](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@avackova](https://forum.cloverdx.com/u/avackova)\
**Post date:** [March 10, 2011, 7:42am UTC](https://forum.cloverdx.com/t/duplicate-records/833/2 "2011-03-10T07:42:20Z")

</div>

Hello,  
I see two simple solutions:

- copy these records many times to the flat file:  
[list:1pwkoc8m][\*:1pwkoc8m]XLSReader → DataWriter with _append=“true”_

- DataGenerator → RunGraph  
[/\*Ⓜ1pwkoc8m]

- Use normalizer, that just duplicates the input records:

```auto
//#CTL2  
function integer count() {  
	return ${rec_no};  
}  
function integer transform(integer idx) {  
	$0.* = $0.*;  
    return OK;  
}  

```

[/list:o:1pwkoc8m]

---

<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:** [March 10, 2011, 11:00am UTC](https://forum.cloverdx.com/t/duplicate-records/833/3 "2011-03-10T11:00:03Z")

</div>

Thanks I used the second solution and it works fine.

FYI I created around 1’000’000 records from 13. with the following functions:

```auto
function int count() {
	return 75000;
}

```

and

```auto
function int transform(int idx) {
	$0.* = $0.*;
	if(idx != 0){
		$0.positionType = $0.positionType + '-gen-' + num2str(idx);
	}
    return 0;
}

```

My process is generating CSV files and run in 150 seconds on a powerful machine.
