I need to know if I am on the last row in a tmap to perform logic. Is there an flag any where that I can use? I was thinking of counting the rows in the file before the tMap and maintain a counter within.
Hi
No a direct way to know it, you can count the rows first, and then add a sequence id to each row in the next subjob, for example:
tfileinputDelimited1--main---tJavaRow
|
onsubjobok
|
tfileinputDelimited2--main--tMap-->
there is a global variable defined on tfileinputdelimited1 to store the total number of rows are read from the file:
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE"))
on tMap: add a new column as row number, set its expression as: Numeric.sequence("s1",1,1)