Catch the line Number that's being processed from fileinput in tMAP

One Star

Catch the line Number that's being processed from fileinput in tMAP

Hi Smiley Happy

It's possible the tMap catch the line number that it's being processed? My goal is to inform which lines of the file dosn't meet the constraints ...
(see image in attach)

Thanks in advance Smiley Happy
Employee

Re: Catch the line Number that's being processed from fileinput in tMAP

$nb_line_tFileInputDelimited_1 should be fine :-)
One Star

Re: Catch the line Number that's being processed from fileinput in tMAP

I have a similar problem (but with Java).
I have a tFileInputDelimited followed by a tMap (connected by a Main connection).
Within the tMap I need to catch the current line number of the tFileInputDelimited.
I used:
((Integer)globalMap.get("tFileInputDelimited_1_NB_LINE"))
but it crashes at runtime with a Null Pointer Exception.
I think this is because the NB_LINE is defined "after" the tFileInputDelimited input loop and not "during" the loop.
Someone can tell me if it's possible to catch the current line number during the loop?
One Star

Re: Catch the line Number that's being processed from fileinput in tMAP

Hi,
you could add a line number with Numeric.sequence to your stream (in a tMap for example).
Bye
Volker