Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is there any Way to get filename directly from the file we using

Hello

 

Am using this below format in job design

 

tfileinputdelimited => tmap => target

 

how can we get filename generated at run time by using tfileinputdelimted file in my job ?

 

Thanks In Advance

Manish

Labels (2)
7 Replies
TRF
Champion II
Champion II

Use the same expression as for tFileInputDelimited or set a global variable with this expression and reuse it for both tFileInputDelimited and your target
tchandu
Contributor
Contributor

Hello Manish,

 

          Could you please let us know how your passing FileName value to the tFileInputDelimited component.

 

0683p000009M7w9.jpgtFileInputDelimited

Anonymous
Not applicable
Author

@tchandu 

 

Am just taking directly from my local like you shown in the picture on  your post, but i want to get that filename in the run time 

tchandu
Contributor
Contributor

@ksingh 

 

           Could you please let me know your use case.

 

 

Anonymous
Not applicable
Author

@tchandu 

 

i took one csv file , wanted to to get the name of the file dynamically at run time and pass to output columns

 

tFileinputdelimited =>tMap => output

 

file name is manish  , so in output column i need manish to be displayed

 

 

 

 

Anonymous
Not applicable
Author

@ksingh 

 

You will have to either store the file name in previous step to a context variable or you will have to use the tFileList as the first component so that its variable can be used in the existing subjob.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

tchandu
Contributor
Contributor

Hello Manish,

 

         I did simple job similar to your use case. you can download code from this link talendJob  .