# Staged incremental reading and writing

**URL:** <https://forum.cloverdx.com/t/staged-incremental-reading-and-writing/940>\
**Category:** CloverDX Platform\
**Created:** [October 11, 2011, 12:00am UTC](https://forum.cloverdx.com/t/staged-incremental-reading-and-writing/940 "2011-10-11T00:00:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![golomeen](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@golomeen](https://forum.cloverdx.com/u/golomeen)\
**Post date:** [October 11, 2011, 12:00am UTC](https://forum.cloverdx.com/t/staged-incremental-reading-and-writing/940/1 "2011-10-11T00:00:00Z")

</div>

I’ve discovered incremental reading in DbInput, it’s a good thing  
But i need something more.  
stage 1 To read data from incremental file “read-only”, i.e. not setting further values back to file.  
stage 2 If stage 1 ends succuessfully, calculate new values for posting them into incremental file

reasons to do this are:  
1. readers are mulptiple but basic values are the same - there’s no need to set update rules for each one, it’s boring  
2. readers use transformed values and some of them simply do not contain data to put back into incremental file

and one more question: is it possible to do such thing not with files but with DB. I mean pass parameters to query which are taken from another query.

---

<div class="post-metadata">

**Author:** ![golomeen](https://avatars.discourse-cdn.com/v4/letter/g/3bc359/32.png) [@golomeen](https://forum.cloverdx.com/u/golomeen)\
**Post date:** [October 11, 2011, 1:38pm UTC](https://forum.cloverdx.com/t/staged-incremental-reading-and-writing/940/2 "2011-10-11T13:38:14Z")

</div>

working method is some kind of hack  
i use incremental file as a parameter file (and it’s lazy because primary graph was based on params) then at the end i update file with query in incremental way  
is it legal and will it (i.e. same incremental and parameter format) work on future releases?

---

<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:** [October 12, 2011, 7:52am UTC](https://forum.cloverdx.com/t/staged-incremental-reading-and-writing/940/3 "2011-10-12T07:52:19Z")

</div>

Hello,  
this is good way and will work with future 3.X releases.  
Something similar can be done with parameter stored in database: read parameter with DBInputTable and pass it to DBJoin, that reads the data itself and stores a new incremental value in dictionary; then read the value from dictionary and update parameter table (see attached graph).

- [incrementalFromDB.grf](https://cdn.cloverdx.com/forum/417%5F8e68addfbf788ac34a6767d771e1a706/incrementalFromDB.grf)
