etlinformaticainformatica-powercenter

How to create repeted seq in informatica?


How to generate repeated seq using Informatica mapping.

Src file

A
B
C
D
E
F
G
H
I
J

Trg file

A 1
B 1
C 2
D 2
E 3
F 3
G 4 
H 4
I 5 
J 5

Thank you in advance.


Solution

  • You can use a Sequence Generator, and then an Expression that divides the value of NEXTVAL by 2:

    OUT: ROUND(NEXTVAL / 2)
    

    In the Sequence Generator you could set "Start Value" to 1 and check "Reset" so that the mapping always starts with 1 1 2 2 3 3 if that's what you need.