Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

get filename from tfilelist

Hi Everyone,

 

I am trying to get a filename from tfilelist which is not possible.

Then i tried to use tfilelistproperties but did not work out.May be I have done some mistake.

Could you please let me know how to get a specific filename using:

 

tfilelist->tfileinputdelimited

OR

 

tfilelist->tfileproperties->tfileinputdelimited

 

My ultimate aim is to get a specific file from a directory and load it into Oracle database.

Regards,

Mohit

 

Labels (3)
8 Replies
TRF
Champion II
Champion II

Have a look to the following global variable associated to your component:

- tFileList_1_CURRENT_FILEPATH the current file with the full pathname

- tFileList_1_CURRENT_FILE the current filename

Anonymous
Not applicable
Author

It is not working.

tfilelist process the files in alphabetical order.

I can't select the desired fileName.

TRF
Champion II
Champion II

Just put the desired filename(s) into the file mask area.

Anonymous
Not applicable
Author

That will be hard coded. When the job will run ,It will get the file that need to be loaded and try to insert that.

I can not hard code every time.

 

TRF
Champion II
Champion II

Previously you said you want to get a specific file from a directory.
What's the rule?
Anonymous
Not applicable
Author

Hi ,

 

I have 10 files.My job is running.There is a validation that it is checking for which file data is already loaded into database.

Suppose there are 2 files for which the data is not loaded.

It will try to load these 2 files only

But there is a catch,'tfilelist' will load all the files.It won't check for any 2 specific files.

So nowi want to understand how to make tfilelist work to check the specific file.

 

regards,

Mohit

TRF
Champion II
Champion II

You need to store the filename for the files which have been loaded. This list can be registered into a text file.
Then, when the job runs, search the current filename within the text file. For that, use a tIterateToFlow component connected to the tFileList on left and to a tMap on the right. The text file will be used as a lookup for the tMap to determine if the file is known or not. Catch the output rejected to get only the new files. Then send the result to a tFlowToIterate component to continue with the next tFileInputDelimited to get the content and store the filename into the text file.
Got it?
Anonymous
Not applicable
Author

Thanks,I will try it and show you the screenshot.

 

Regards,

Mohit