ODI Series - Pulling file names and timestamp from directory
Recently, I was asked a question by my colleague, Linga (he always comes up with something or the other) - Can we pull file names from a directory and process the latest one out of them, while keeping the history of processed files ? I could recall that one other colleague Parasuram PJP did something similar. When I tried out his code, that did not work for me due to some reason. Anyways, he was kind enough to share some pearls of wisdom and I sat down searching details about Jython to fetch file names and additional information. To find out the latest file out of all, we need to capture the timestamp of its last modification. Since we need to keep a log of all files which gets processed, we will be maintaining a RDBMS table (SQL Server in my case) - FILENAMES with following structure Along with this comes a twist where initial part file names will be same having different suffix. Just to simulate the scenario, I could think of some files which were ...