Hi Everyone, I have a pipeline on a schedule, with an error pipeline, that writes a file with the issue. My problem is that when the pipeline runs and there is no data to process, it will write an (empty) error file, even if the run was successful (everything is green). How can I prevent this? The monitor shows each of these runs as Completed with errors, but I cannot see anything triggering the error.
Hi Ricardo, This usually happens in SnapLogic when the error pipeline is triggered by an empty document stream rather than a real failure. A few common causes:
A downstream Snap expects input but receives no documents
A Mapper/Writer Snap emits an empty document (or "null fafe" disabled mapper config).
The error view is connected and receives a non-fatal validation/error document
“Treat empty result as error” behavior from certain Snaps
Because the error pipeline writes a file whenever it receives anything, it creates an empty error file even though the main pipeline completed successfully. => First thing you can do is toggle the "Ignore empty stream" in the formatter snap in you error pipeline ; this will avoid triggering the file writing. => You might also want to handle the "no data" case within your main pipeline, so it won't throw an error (or the snaps won't generate an output in case of empty stream).
Thanks so much, Marwen.
I checked “Ignore empty stream” and not only I avoid now the empty error file, but I don’t get the “completed with errors” message anymore.
Great! You're welcome.
