[How To] Informatica - Generate Sequence numbers without using Sequence Generator

Sequence generator is often used to generate unique values, primary keys while dealing with relational databases / flat files. However, we can achieve the same objective without using a Sequence generator as well. This can be done by using an Expression transformation and variable whose values increases by 1 (or any other value we desire) each time for a new record.

In example below, we consider a scenario where we generate unique Roll_No's for each Student record using Expression transformation. Here, the source as well as the target is a flat file.



It may however be noted that, Sequence generator has its own advantages like they are reusable, they can loop though a certain set of values and they can generate non-repetitive values each time the session runs. Implementation of sequence generator using Expression however does not support this.