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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tftpfilelist, tftpget and tfileinputdelimited

Hello,
i want to fetch all files from a remote directory with tFtpGet one after another and want to process each of them with tFileInputDelimited. My Problem is, that i don't know how i put the filename from the received file to the tFileInputDelimited component. Of course i could use the same local Filename for each remote file and put this into tFileInputDelimited, but i don't want to do that.
Asume that the remote files are:
file1.csv
file2.csv
file3.csv
my local dir is d:/temp
so the first file i have to process with tFileInputDelimited is "d:/temp/file1.csv", the second is "d:/temp/file2.csv" and so on.
My workflow is:
tFtpConnection->onSubjobOK->tFtpFileList->iterate->tFtpGet->OnComponentOK->tFileInputDelimited->row1(main)->tLogRow
Can someone help me with this?
Kind Regards
Holger
Labels (2)
1 Reply
Anonymous
Not applicable
Author

Hi:
Try to modify your job as follow:
tFtpConnection->onSubjobOK->tFtpFileList->iterate->tFtpGet->Run if->tFileInputDelimited->row1(main)->tLogRow
//only replace OnComponentOK with Run if
tFtpGet filemask: "((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"))", Local Directory: "d:/temp"
Run if condition: ((String)globalMap.get("tFTPGet_1_CURRENT_STATUS")).equals("File transfer OK.")
tFileInputDelimited File Name/Input Stream: "d:/temp/"+((String)globalMap.get("tFTPFileList_1_CURRENT_FILE"))
ps: take care of the component's tail number