I need a pipeline to wait until a file (named say test.csv) on a network share is picked up and moved/deleted by another process. Then my pipeline can write a new test.csv. The other process might only take a few seconds, or could take up to an hour to process test.csv. Is there a way to have my SnapLogic pipeline watch test.csv on the network share and wait until that file is gone and then continue processing? This would be sort of the opposite of what File Poller does.
Figured it out. If anyone else is trying to accomplish the same task, here is my solution:
- File Poller monitors the source location (“out” folder). “Only Output on Change” is not enabled.
- When input is received from File Poller, Directory Browser reads the target folder filtered for test.csv.
- Filter snap checks to see if the Name path in the JSON object exists using this expression: !($.hasPath(“Name”)). If the path does not exist, filter the record so no further processing is done.
- If the Name path exists, proceed to the File Reader snap and read the file from the out folder.
- Write the file to the target location.
- Delete the file from the out folder.