Sagar Jadhav
Sagar Jadhav

Reputation: 13

tAggregateRow Talend - How can i count rows from table in Talend

The format is

as shown in the image: jobscreenshot

Under tAggregateRow basic setting I have this: taggregaterow basic setting

What should I write in tJava to get the value of rowcount?

Upvotes: 1

Views: 7346

Answers (1)

54l3d
54l3d

Reputation: 3973

If you want to get the row number of the data read by tjdbcinput, Talend provide it natively with no need to make aggregation, the row number is stored in the global map and you can get it using this line of code ((Integer)globalMap.get("tJDBCInput_1_NB_LINE"))

You can use it in a tJava component and wite it in your console using System.out.println(((Integer)globalMap.get("tJDBCInput_1_NB_LINE")));

Upvotes: 3

Related Questions