Capture File Details of all subjobs in Talend

348 views Asked by At

I have a requirement to move files from SFTP to a local directory and it is simple. I have used tftpconnection-->tfileexists-->(if)tfileinput-->tmap--tfileoutput to move files and then i have other subjobs as tfileexists-->(if)tfileinput-->tmap--tfileoutput. I have ten subjobs in the same job moving different files from different directories of SFTP.

I have to also capture all the file related details i.e size of file, number of rows and time of processing, source and destination.

Now i guess i can achieve this if i use

tfileproperties--->iterate--->tfilerowcount--->onComponentOk--->tfixedFlowInput
-- tfileoutput

However I just want one subjob that can capture all the details of the files.But in the above flow i have to hard code subjob file details i want to capture in the tfixedFlowInput which is not what i am looking for. Is there any way i can make this happen in a single subjob by dynamically changing file details in tFixedFlowInput.

Any guidance will be great-full.

Thanks.

1

There are 1 answers

1
Théo Capdet On

You have two choice:

  • You can use the component tFileProperties (or tFTPFilePropertie).
  • You can use intern variable of the component tFileinput ( Windows -> Show view -> General -> Structure -> Your Component )

PS : If you just want to only move file without do any modifications you can use tfilecopy maybe.