Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
How can I iterate the results from tfilelist?
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
How can I create a global variable ?
context.p_nome_vagas_ano = (String)globalMap.get("Iterate");
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....
I actually just dragged the value from the location shown below to the tJava code, then added the "System.out.println(" .....
Each of those values under tFileList_1 is a globalMap value that you can use.