The clarification helps. A stage variable-only solution is possible here, but it may be considered as "quick and dirty." Something more flexible may involve doing a pivot as a second step. If you get interested in that, search this forum on 'pivot.' We can discuss stage vars for purpose of learning.
Your Col1 of a sequential row ID is easily generated in a Transformer stage using system variable @INROWNUM. To start out, run your stage sequentially or run the parallel job on a single node config file.
Insert a new stage variable (suppose you name it svRow123) with derivation:
Put that stage var into a new output column and view the result. Without any constraint, you should get a repeating pattern to work with in your output rows of 1,2,3,1,2,3,... Run it at this point and check.
Append another stage variable with derivation:
Code: Select all
NullToEmpty(lnk.Col2) : NullToEmpty(lnk.Col3) : NullToEmpty(lnk.Col4)
Drag it into a new output column, run it, and view the result. It should give rows like A,B,C,D,E,F,...
Add an output link constraint to only output every 3rd row:
That is only a start. Take it one step at a time... To complete it in this way will require more stage variables and more understanding of them. I left out that gap for now. Try it and see what ideas and questions you may get.