Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
joe86
Contributor
Contributor

scenario based question

Hello All,

Greetings!

Here is my scenario.

I have a file with 1000 rows. I want to multiply each row with its own number.

For eg: row-1 * 1, row-2*2, row-3*3, row-4*4 ..... row-n*n.

Can anyone please help me to find an answer for this.

I thought we can use tRowGenerator to achieve this task, i could not get an idea to build it.

I have been using Talend for past 2yrs..

Any help at earliest will be helpful 🙂

2 Replies
gjeremy1617088143
Creator III
Creator III

Hi you can use Numeric.sequence("s1 ",1,1) on a new field an then multiply by itself.

Send me Love and Kudos

JohnRMK
Creator II
Creator II

Hello

 

as suggested by Jeremy, here is the solution

0695b00000F5nC1AAJ.pngThe first tMap to assign the row number as a new column

0695b00000F5nC6AAJ.pngthe second tMap to perform the multiplication

0695b00000F5nCGAAZ.png