Monday, 23 June 2014

ODI File Wait Tool - My Experiences

The other day, I was experimenting on ODI File Wait tool and when I executed the package, the execution appeared to be stuck.

What I wanted to do was the following:

1. Wait for a file in a directory
2. Once the file is detected, call an interface to load the file.
3. If the first interface fails, email me.
4. If the interface is successful, call another interface.
5. If the second one fails, email me.
6. If the second one was successful, then call ODI File Wait
7. Delete the file.

The package was designed and everything was good, except that even though the file was present in the directory, it was not being detected by ODI.

So, what happened was that instead of providing the command to the File Wait tool, I used the UI to specify the values for the parameters. One of the parameter - File Mask, when I clicked on the browse (three dots), it let me choose the file and instead of populating the file name, it populated the entire path (including the file name). Now, ODI expects ONLY the file name (or a wild card) in the File Mask field. There is another field to specify the directory where the tool needs to look for data. But since I specified the directory in the directory field and also in the file mask, ODI was not able to find the file, thus the execution appeared to be stuck.

So, lesson learned - provide only the file name (or the wild card) for the File Mask field and directory to the directory field.

Hope someone else might find this useful.