Dynamic File name generation

Six Stars

Dynamic File name generation

 

 

Can anyone suggest an approach to build a job which will create a file with with the name same as the source file. As I am new to this tool I am not sure from where shall I start. 

any help is highly appreciated.


Accepted Solutions
Five Stars

Re: Dynamic File name generation

Just use a tfileList (the directory where your file is present) and in the fliemask you can give depending on your file name. Connect iterate link from tfileList to tfileInputDelimited (in directory, give variable ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

In your tfileoutputDelimited component you can give value for directory as your output directory + ((String)globalMap.get("tFileList_1_CURRENT_FILE")) -----this variable stores the current filename from tFileList component.

 

I hope this helps.


All Replies
Thirteen Stars

Re: Dynamic File name generation

Six Stars

Re: Dynamic File name generation

Hi Manohar, 

i appreciate your effort but i guess that one is for SSIS,solution in  talend is what i am looking for . 

Thirteen Stars

Re: Dynamic File name generation

Five Stars

Re: Dynamic File name generation

Just use a tfileList (the directory where your file is present) and in the fliemask you can give depending on your file name. Connect iterate link from tfileList to tfileInputDelimited (in directory, give variable ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

In your tfileoutputDelimited component you can give value for directory as your output directory + ((String)globalMap.get("tFileList_1_CURRENT_FILE")) -----this variable stores the current filename from tFileList component.

 

I hope this helps.

Six Stars

Re: Dynamic File name generation

Hey Ravinderk,

This worked, thanks a lot for your time.