I’m using if/else processors in combination with asserts as a checking mechanism before and after crucial joins (to interrupt execution if duplicate join partners are detected).
The idea is the following:
- count rows before join
- count rows after join
- use if else processor to compare these two row counts
4.a if row counts are equal → processor forwards input to left output port and execution proceeds as intended
4.b if row counts are not equal → processor forwards input to right output port → use an assert processor with a false statement (e.g.,
SELECT 1=0 from inputTable) here to interrupt the execution
Issue: If I’m missing all join partners in the join I’d like to check, the input of the if/else processor is empty (due to inner join) and my assert processor is executed (i.e., it shows green check marks) but it does not fail.
Expected behaviour: if the right output branch is used and the assert is executed, the assert will always fail, no matter of the input data
Workaround: Union with a dummy column
Apparently, if the input to the assert p. is empty the assert does not do anything?
What am I missing here? Can anybody explain this to me?