One Star

[resolved] TfileList nb_File parameters in Tmap

Hi,
i'm using the tfilelist component following by a tfilecopy in my job.
after my tmap i added a tmap with an expression to filter the result using the parameter Tfilelist Nb_file.
My variable var.nbfile take the value of the parameter ((Integer)globalMap.get("tFileList_1_NB_FILE")).
When i run my job i occur an error
Exception in component tMap_1
java.lang.NullPointerException
if I change the value of my variable by a number, it's ok.
If i add a column in my output data with ((Integer)globalMap.get("tFileList_1_NB_FILE")) 's value, it's returned me the value of this parameter.
An idea about my problem ?
1 ACCEPTED SOLUTION

Accepted Solutions
Four Stars

Re: [resolved] TfileList nb_File parameters in Tmap

Hello,
What is your Studio version? Because this bug has been fixed on version 3.1 of Talend Open Studio:
http://talendforge.org/bugs/view.php?id=7107
Now, NB_FILE is available as a flow variable.
Can you post your Job here if you are on version 3.1.x or 3.2.x please?
3 REPLIES
Four Stars

Re: [resolved] TfileList nb_File parameters in Tmap

Can you add a screenshot of your job please?
In fact, the tFileList_1_NB_FILE is only available after the execution of the tFileList component.
If your tMap is used inside a tFileList iteration, the variable is not yet available.
One Star

Re: [resolved] TfileList nb_File parameters in Tmap

ok, in fact i used an tfilelist iteration so my this paramater is not available in my tmap yet !
thanks.
Four Stars

Re: [resolved] TfileList nb_File parameters in Tmap

Hello,
What is your Studio version? Because this bug has been fixed on version 3.1 of Talend Open Studio:
http://talendforge.org/bugs/view.php?id=7107
Now, NB_FILE is available as a flow variable.
Can you post your Job here if you are on version 3.1.x or 3.2.x please?