Talend Tutorials & Scenarios Prepared by Venkat Rathnam Tekuri
Talend Tutorials & Scenarios Prepared by Venkat Rathnam Tekuri
Target:
Starting job TVR_CUMULATIVE_SUM_JOB at 19:50 27/02/2021.
[statistics] connecting to socket on port 3590
[statistics] connected
.--+-------+------.
| tLogRow_1 |
|=-+-------+-----=|
|ID|NAME |SAL |
|=-+-------+-----=|
|10|VENKAT |1000.0|
|11|RATHNAM|2000.0|
|13|TEKURI |3000.0|
|14|ROHIT |6000.0|
|15|SACHIN |8000.0|
'--+-------+------'
.--+-------+------+-------------.
| tLogRow_2 |
|=-+-------+------+------------=|
|ID|NAME |SAL |CUMULATIVESUM|
|=-+-------+------+------------=|
|10|VENKAT |1000.0|1000.0 |
|11|RATHNAM|2000.0|3000.0 |
|13|TEKURI |3000.0|6000.0 |
|14|ROHIT |6000.0|12000.0 |
|15|SACHIN |8000.0|20000.0 |
'--+-------+------+-------------'
[statistics] disconnected
Procedure:
Drop tFileInput Delimited metadata, tLogRow,tJavaFlex and tLogRow from the Palette into the
designer workspace.
Connect the tFileInput Delimited to the by using a Row > Main link. Then, connect the
tLogRow to tJavaFlex then tLogRow, using a Row > Main link.
Double click the tFileInput Delimited Define the properties as per the below.
Double click the tLogRow component and define the Table (Print Values in cells of a table).
Double click the tJavaFlex component and go to edit schema and define as per the below .
Then go to StartCode, Main Code and End Code Define as per the below.
// start part of your Java code
float fsal=0;
float fsal=0;
Double click the tLogRow component and define the Table (Print Values in cells of a table).
Executing the Job or Save your Job and press F6 to execute it.
You will get the two desired output.
Source:
ID,DEPTNO,SAL
101,10,1000
112,30,3000
133,30,2000
144,20,4000
154,10,6000
155,10,5000
144,20,7000
144,20,9000
133,30,8000
Target:
Procedure:
Drop tFileInput Delimited metadata, tSortRow,tJavaRow and tLogRow from the Palette into
the designer workspace.
Connect the tFileInput Delimited to the tSortRow, using a Row > Main link. Then connect the
Other components using a Row > Main link.
Double click the tFileInput Delimited Define the properties as per the below.
Double click the tSortRow component define the Deptno column in asc order.
Double click the tJavaRow Component define the code as per the below.
Double click the tLogRow define table format and run the job you will get desired output.
Cumulative Sum DEPTNO wise AND Cumulative sum:
Source:
Target:
Procedure:
Drop tFileInput Excel metadata, tLogRow1,tJavaRow and tLogRow2 from the Palette into the
designer workspace.
Connect the tFileInput Excel Other components using a Row > Main link.
Double click the tFileInput Excel Define the properties as per the below.
Double click the tJavaFlex define the code as per the below.
// start part of your Java code
float fsal=0;
float fysal=0;
int iyear=0;
Double click the target tLogRow define the table and save the job and run the job.