Five Stars

Replicate a row many times on the basis of the value of a column in the row

Dear all, i need a way to replicate the rows of a table many times on the basis of the value of a column in the same rows.

To make an example:

 

row1 : aaa     bbb   ccc   10

row2: abc      def    ghi     5

 

i want to replicate the row1 10 times and the row2  5 times.

 

the result will be:

 

aaa     bbb   ccc   10

aaa     bbb   ccc   10

aaa     bbb   ccc   10

aaa     bbb   ccc   10

aaa     bbb   ccc   10

....

abc      def    ghi     5

abc      def    ghi     5

abc      def    ghi     5

abc      def    ghi     5

...

 

is there a way to solve that issue?

1 REPLY
Moderator

Re: Replicate a row many times on the basis of the value of a column in the row

Hello,

Please have a look at tRowGenerator component. It can generate as many rows and fields as are required using random values taken from a list.

For more information, please have a look at this component reference about:TalendHelpCenter:tRowGenerator.

Best regards

Sabrina

 

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.