Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following job
when run it displays 2 files
How to display only the latest WLA file? Just one file.
There are many ways to do that. This is one:
- Use a tFileList to list all the files. Set the Order By to be By modified date and Order action ASC.
- Next Add a tFileProperties, or anything you need, to be executed after the tFileList component is complete. Then use the tFileList Current File Name with path property. This will return the most recent modified file with full path.
Regards,
Mark Costa
There are many ways to do that. This is one:
- Use a tFileList to list all the files. Set the Order By to be By modified date and Order action ASC.
- Next Add a tFileProperties, or anything you need, to be executed after the tFileList component is complete. Then use the tFileList Current File Name with path property. This will return the most recent modified file with full path.
Regards,
Mark Costa
I have followed using tfileproperties but it still displays all the files, but sorted by the latest date. What I want is how to display only the most recent file? just one file.
This is what my job is doing. You are getting the wrong relationship between the tFileList and tFileProperties - you are using Iterate, that is why you are listing every single file. You have to call tFileProperties after you execute the whole tFileList component - OnComponentOk - like in my diagram.
Yes it has successfully displayed one type of the latest file using oncomponentok.
I have another question. I want to get the latest xls file to process and insert into the database. Where should I put the tfileinputexcel component? And where should I put the tmap for the excel?
Great! So, you actually don't need the tFileProperties component there. I added it there just to illustrate the use of the tFilesList_1_CURRENT_FILEPATH property. With that said, you can, for instance, replace the tFileProperties with the tFileInputExcel and the tMap right after that, just like you did before in the first images you sent.
Thank you so much, you are very helpful. I have another question maybe you can help me please visit https://community.qlik.com/t5/Design-and-Development/How-to-read-specific-excel-cells-using-talend/m...