Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
caioaloe_
Contributor
Contributor

Iterate results from tfilelist

Hi!

How can I iterate the results from tfilelist?

Labels (3)
3 Replies
Anonymous
Not applicable

This help document should guide you in the right direction.....

https://help.talend.com/r/en-US/8.0/tfilelist/tfilelist-titeratetoflow-tfileoutputdelimited-tlogrow-finding-duplicate-files-between-two-folders-standard-component-this

caioaloe_
Contributor
Contributor
Author

0695b00000OCM2sAAH.pngHow can I create a global variable ?

 

context.p_nome_vagas_ano = (String)globalMap.get("Iterate");  

 

Anonymous
Not applicable

The globalMap variable you are talking about is created for you on each iteration by the tFileList component. If you tFileList component is called tFileList_1 (not the label which is "Lista_Arquivos"), then the globalMap variable you want will likely be....

 

((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

 

You can see what I have done here....

0695b00000OCMEFAA5.png 

I actually just dragged the value from the location shown below to the tJava code, then added the "System.out.println(" .....

 

0695b00000OCMFSAA5.pngEach of those values under tFileList_1 is a globalMap value that you can use.