I am getting a number of files like below in incoming folder
if (check US file && IND file)
get the latest modified US file and IND file
iterate and process files
How can i execute the above in Talend
Note - I want to check only US and IND files , if both files are present then only get the latest file of US and IND.... Process the latest file further
Use a tFileList and "Order by" modified date. Then check the filename supplied by the ((String)globalMap.get("tFileList_#_CURRENT_FILE")) globalMap variable to see if it is worth processing. If it is, use the filepath variable ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) to point your file component to it.
I think you are confusing the issue by combining the country and date filtering/ordering. You can simply process the files in order (assuming all will be processed) and selectively process them according to the IND/US section in the name.
That is fine. That does not have to be part of the ordering. Use a tFileList with the settings I suggested for the ordering and you can use a couple of filemasks to filter IND and US in if you like.....I should have suggested that in the first comment :-)
Try Talend Cloud free for 30 days.
Introduction to Talend Open Studio for Data Integration.
Practical steps to developing your data integration strategy.
Create systems and workflow to manage clean data ingestion and data transformation.