Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Start Jobs or Tranformations in a Job based on conditions

  1. #1

    Default Start Jobs or Tranformations in a Job based on conditions


    I was wandering if it is possible to start a job/ransformation in a main job based on a certain condition. For example within a job a determine a scenario first. The scenario can be New, Old or Between. If the scenario is Between, the the Between job must be started, the other jobs should not do anything, but they are placed in the main job.

    Please let me know if anyone knows how to handle this is PDI 3.0.

    Thanx in advance.

    Michael Doves

  2. #2
    Join Date
    Nov 1999



    We made an improvement to version 3.0.1 in that regard:

    See also: the "JavaScript" job entry in the Spoon documentation.

    What it comes down to is that we expose the parent job to let you evaluate variables.
    You can also evaluate results from a previous job entry (for example a transformation).
    That way you can send the job one way or another.

    Another way to do what you want is this:
    1. evaluate the condition, for example if the filename starts with CUSTOMER_ you want to execute transformation "update_customer_dim.ktr".
    2. Set a variable "TRANSFORMATION_TO_EXECUTE" to "update_customer_dim.ktr" in either a transformation or the JavaScript job entry.
    3. execute a "Transformation" job entry with transformation filename set to ${TRANSFORMATION_TO_EXECUTE}
    This scenario is more appropriate if you want to have a lot of different transformations or jobs to branch out to.
    See also the "run_all" sample in the jobs sections of the samples.



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.