There are generally two approaches here:
- If you have a connector that produces files that you don’t do any processing with, you can connect that connector to a Script connector, and if you don’t create any code in that Script, it will dispose of that file (technically, it’s processing them but doing nothing).
- If you’re talking about the REST connector in particular, in later releases of CData Arc, you can set the Advanced->Output Behavior to None to not output a response to the Receive folder
I think Russell needs a script that checks the file length.
If length > 0 continue, if length = 0 ignore and/or send to dead-end-connector.
If the REST connector produces an empty file without any contents, you can use the fileread()
operation to check if the file contains content or not with the following script. You can then branch them appropriately using a branch connector based on the header:
<arc:set attr="file.file" value="[filepath]" />
<arc:call op="fileRead" in="file" out="result" >
<arc:if exp="[result.file:data | equals('')]">
<arc:set attr="output.header:Empty" value="Yes" />
<arc:else>
<arc:set attr="output.header:Empty" value="No" />
</arc:else>
</arc:if>
</arc:call>
<arc:set attr="output.FilePath" value="[FilePath]" />
<arc:push item="output" />
Additionally, you can write the script based on file size as well.