Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: How to implement branching logic in job

  1. #1
    Join Date
    Nov 2016

    Default How to implement branching logic in job

    I am trying to figure out how to do branching in the job. I need to run a transformation based on a simple sql statement result. I have done the following so far.
    In the job I first call a transformation that executes a table_input step and dump the result to a variable.
    Back to the main job I use simple evaluation step to check the value stored in the variable. If it is equal to the predefined value then it succeeds to the next step.
    Everything seems to work.
    The problem is that if the condition stored to the variable is not met, simple evaluation step shows failure as the result, and the whole job fails as well. Is there anyway around this? What I want is to do nothing if condition is not met and whole job should succeed.



  2. #2
    Join Date
    Apr 2008


    Have you tried adding a "Success" step, and connecting the Fail path of the Transform to it?

  3. #3
    Join Date
    Sep 2014


    My knowledge of PDI: Whether a job "succeeds' or 'fails' is based on the result of the last step.

    If you have A -(success)->B .... then if A fails, the job will immediately end - there is no failure route - and the last step, A, failed ... the whole job is considered failed.

    If you have A -(no matter what) -> B, or A - (fail)->B, then if A fails, it's largely irrelevant - it's left up to B.

    In your case, it sounds like you don't have a 'failure' route from the conditional step. Meaning it will be the last (failed) step, resulting in failure.

    If you really want the job to abort/ do nothing (and show success) ... then either route a failure route from the conditional step to a Dummy (Do Nothing) step, or the step specifically designed for this -- the 'Success' checkmark (which also does nothing).

  4. #4
    Join Date
    Aug 2016


    Should be fairly simple. Have you tried something like this?Name:  example.png
Views: 205
Size:  6.9 KB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.