Search code examples
etltalend

Display error if tFilterRow results == 0


I have a job in which I use a rowFilter based on a condition. It works. But, what I want to do more is to display an error or stop the job if the number of filtered rows is 0. How can I achieve that?

This is my job:

enter image description here Does anyone could help me? Thank you in advance!


Solution

  • You need to use "RunIf" trigger and put the condition that you want here so that the job process would determine it's running course based on it. On your case it would be something like -

    ((Integer)globalMap.get("tFilterRow_1_NB_LINE_OK"))>0
    

    tFilterRow_1_NB_LINE_OK is a global variable part of the tFilterRow component which says "Number of lines matching the filter".

    If you want to catch the error and print out the details you could connect the "RunIf" to tDie component and then use tLogCatcher component to catch the error - make sure that you have selected the "Catch tDie" option.