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 :-)
Join us at the Community Lounge.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Watch the recorded webinar!
Pick up some tips and tricks with Context Variables
Learn how media organizations have achieved success with Data Integration
Introduction to Talend Open Studio for Data Integration.