jervin
5 years agoNew Contributor III
Wait to run pipeline until target file does not exist
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 on...
- 5 years ago
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.