# Clover incremental data load

**URL:** <https://forum.cloverdx.com/t/clover-incremental-data-load/1364>\
**Category:** CloverDX Platform\
**Created:** [March 7, 2014, 12:00am UTC](https://forum.cloverdx.com/t/clover-incremental-data-load/1364 "2014-03-07T00:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![snehangka](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@snehangka](https://forum.cloverdx.com/u/snehangka)\
**Post date:** [March 7, 2014, 12:00am UTC](https://forum.cloverdx.com/t/clover-incremental-data-load/1364/1 "2014-03-07T00:00:00Z")

</div>

Hi,

I am relatively new to CloverETL and is looking for some solution to the below problem:

- I am reading data from a .dat file (field delimiter being ‘|’) one field being modified date.

- Need to incrementally load data based on the modified date field. Example if 2 records get modified/added in the input file I need to have them in a separate extract file, say, incremental.dat

I have gone through the forums/user guide and came across incremental file/incremental key.However it would be great if anyone gives me step by step solution to this.

I am using UniversalDataReader from an input file called customer\_input.dat

Thanks,  
Snehangka

---

<div class="post-metadata">

**Author:** ![novakj](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@novakj](https://forum.cloverdx.com/u/novakj)\
**Post date:** [March 7, 2014, 1:29pm UTC](https://forum.cloverdx.com/t/clover-incremental-data-load/1364/2 "2014-03-07T13:29:34Z")

</div>

Hi,

I prepared for you simple example of incremental reading. In this example there is used incremental reading from input file (based on date field). When you run the graph for the first time, all records will be stored into output file called incremental.dat. The second run of the graph will read only new lines from input file (please add some new lines into the input file for test).

- [IncrementalReading.zip](https://cdn.cloverdx.com/forum/17580%5F4581873c06f446a2d8aff0e1e2a336e1/IncrementalReading.zip)

---

<div class="post-metadata">

**Author:** ![snehangka](https://avatars.discourse-cdn.com/v4/letter/s/96bed5/32.png) [@snehangka](https://forum.cloverdx.com/u/snehangka)\
**Post date:** [March 9, 2014, 8:55am UTC](https://forum.cloverdx.com/t/clover-incremental-data-load/1364/3 "2014-03-09T08:55:37Z")

</div>

Thanks Novakj for your prompt response.

However this works only if a new record is added to the input file. What if the attribute values of the existing records gets modified? In this case using incremental file/incremental key is not identifying the modified records. Could you please provide any example for the same?

Thanks,  
Snehangka

---

<div class="post-metadata">

**Author:** ![novakj](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@novakj](https://forum.cloverdx.com/u/novakj)\
**Post date:** [March 11, 2014, 3:33pm UTC](https://forum.cloverdx.com/t/clover-incremental-data-load/1364/4 "2014-03-11T15:33:36Z")

</div>

Unfortunately, it is not possible to use incremental reading from file when existing records were modified. The incremental reading mechanism does not recognize these changes.

You have to read a whole file and search for changed records. You can, for example, compare new content of your input file with a previous copy of this file (you can use, for example, DataIntersection component).
