Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: switch case i want to execute a step depending of the value of a field

  1. #1
    Join Date
    Sep 2008
    Posts
    21

    Default switch case i want to execute a step depending of the value of a field

    In kettle 3.0.4, i want to execute a step (like extract from database) only if a field (in a unique row) is equal to "X" if not i want to use the dummy step, is it possible?

  2. #2

    Talking

    You should give more info about exactly what you want to do.
    I assume you want to run transformation and compare a field in data set.
    So you can use "Switch/Case" step. But remember that everytime your row with field match compare of 'X' it triggers steps that it is redirected to. So if it is "SQL script" step it can be executed multiple times depending how many rows went through hop.But you want to run extract just once, right? I am not sure if it is what you want to do.
    So i think it is not simple to do this.

  3. #3
    Join Date
    Sep 2008
    Posts
    21

    Default

    Hi,
    i have a step that have calculated a ratio...if this ratio is > 'X' i want to proceed to an extraction transformation and load , if not i want to stop the process

  4. #4
    Join Date
    Apr 2008
    Posts
    4,685

    Default

    Sounds like a Multiple Transformation Job then...

    Trans 1: Calculate Ratio & Store Variable
    Job JS: Evaluate Ratio
    Trans 2: Run Extract

    Take a look at "%kettle_home%\samples\jobs\evaluate-result-rows\Evaluate Result Rows.kjb" -- it might give you some ideas on how to do it.

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.