how to give dynamic file path input to tFileInputPositional

One Star

how to give dynamic file path input to tFileInputPositional

Hello,
I am trying to take data from text file and store them into database. right now fortFileInputPositional filename/stream
i have set a static path. i want to know that whether is it possible to set dynamic path ? so i can run my job on multiple file in one execution?
thanks.
Moderator

Re: how to give dynamic file path input to tFileInputPositional

Hi,
It is possible to set dynamic path.
For your scenario, you can use tContextLoad or explicit tContext to load your multiple filename and give a Context value in filename/stream of tFileInputPositional.
Please take a look at my screenshots and online component reference TalendHelpCenter:tContextLoad
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: how to give dynamic file path input to tFileInputPositional

Hi Dipens,
I Assume this is what you are looking for - https://help.talend.com/search/all?query=tFileList&content-lang=en
Use tFileList-->tFileInputPositional--> DatabaseOutput
- in tFileInputPositional - use tFileListCurrentFilePath for Filename
- use appropriate filter if any...
After executing the job, you would iterate on each file based on standard metadata and see the output of each file.
Thanks
Vaibhav