Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Call job depending on row count

  1. #1
    Join Date
    Apr 2009
    Posts
    16

    Default Call job depending on row count

    Hello everybody,

    is it possible to call a job depending on the number of rows of a table?

    I am trying to read the "depth" of a folder by counting the number of seperator chars (refer test.ktr). The number of rows in the output represent the depth of the folder. If the output contains only one row i want to run job A and if the output contains two rows i want to run job B. Is something like this possible?

    Thanks in advance! Raphael
    Attached Files Attached Files

  2. #2
    pstoellberger Guest

    Default

    you can store this output in a table and then use at the job level the Condition > "Evaluat row numbers in a table" step to do exactly that to define which job shall execute next. if you have more than 2 options just place more than 1 "Evaluate row numbers in a table" after that

  3. #3
    Join Date
    Apr 2009
    Posts
    16

    Default

    Sounds perfect but i am using pdi version 3.1.3.1. I think the step "Evaluate rows number in a table" is new in version 3.2. Is there any way to solve the problem with pdi 3.1.3.1?

  4. #4
    pstoellberger Guest

    Default

    thats true

    i'm sure its possible ( e.g count rows in an extra transformation and store that in a variable which you evaluate in a javascript step at job level)

    i'd simply recommend upgrading to 3.2 - its much nicer

  5. #5
    Join Date
    Apr 2009
    Posts
    16

    Default

    Okay, thank your for your help!

  6. #6
    Join Date
    Nov 1999
    Posts
    9,729

  7. #7
    pstoellberger Guest

    Default

    Ah, nice. I was just guessing. Thanks for the URL

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.