ksalem
3 years agoNew Contributor III
Throw exception on 0 documents
Hi All,
Apologies if this one has been asked before.
There is a scenario in the current pipeline being developed where after a filter operation the number of documents returned can be 0. at this ...
- 3 years ago
HI @ksalem,
You can build a mechanism that will check for existing documents, by using the Gate snap.
The Gate Snap will move the pipeline flow even if no documents are provided on the input. From there you can simply add a router that will check for documents (Ex.
$input.lenght == 0
) and throw an error by using the Exit snap.Hope this helps,
Bojan