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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
A_San
Contributor
Contributor

How to get a File Name

I am trying to get the file name of a file that I am trying to load to postgres database.

I see that we need to use tFileList_1_CURRENT_FILE for the current filename. Where do I give this command?

tfilelist ->tfileInputDelimited->tDBOutput is what I have right now. 

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Assuming you are loading the file and retrieving its contents using the tFileInputDelimited, you will need to add a tMap between the tFileInputDelimited and the tDBOutput. In the tMap add another column on the output table (the data being sent to your tDBOutput) and populate it with ....

 

((String)globalMap.get("tFileList_1_CURRENT_FILE"))

For every row of data returned by your file, you will also get the file name.

View solution in original post

1 Reply
Anonymous
Not applicable

Assuming you are loading the file and retrieving its contents using the tFileInputDelimited, you will need to add a tMap between the tFileInputDelimited and the tDBOutput. In the tMap add another column on the output table (the data being sent to your tDBOutput) and populate it with ....

 

((String)globalMap.get("tFileList_1_CURRENT_FILE"))

For every row of data returned by your file, you will also get the file name.