Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Only 1 input row was expected to set the variables and at least 2 were received.

  1. #1

    Default Only 1 input row was expected to set the variables and at least 2 were received.

    Any ideas on how to resolve this error?

    I am passing results from one job to the next.

    Kettle 3.0.0 RC2

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    That needs an extra layer in your jobs... well ... depending on what you want. It wouldn't make sense to set more than values depending on more rows as the last one would survive... So you need a construct to 'execute for each input row'.

    Regards,
    Sven

  3. #3

    Default

    In my root job I am getting 5 output rows in a transformation which I do a [Copy rows to result].

    The next thing I do is to call another Job with the [Copy previous results to args] and [Execute for every input row] both checked.

    In that child job the first thing I do is setup some variables in a transformation (with the [Copy previous results to args] - Checked) and I have these variables set to [Valid in the parent job]

    It is within that transformation that I am getting the error.

    If I do a [Clear list of result rows before execution] I do not get any variables passed.

    Any ideas?

    Thanks,

    Marc Pike

    (Hey, maybe if I keep asking some damn many questions I will no longer be a junior member) he he

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    Set Variables only accepts 1 row, you have to do something like "execute for each row" in a higher level... Have a look at the "process all tables" example under the samples/jobs directory... it does something similar

    Regards,
    Sven

  5. #5

    Default

    Hmmm...got it working by removing the Copy previous results to args on the child Jobs.

    If you have the time, can you explain this to me?'

    Thanks for the tip, as soon as I checked that sample out I saw the difference, but am not clear on what the Copy previous results to args does now.

    I thought it would pass the previous data to the next job in line.


    Thanks again!

    Marc Pike

  6. #6
    Join Date
    May 2006
    Posts
    4,882

    Default

    Your problem is/was that you let several rows arrive at a set variables step... the rows arrive asynchroneously and the last row you would send would contain the value the other transformations would see. Hence only 1 row is allowed to arrive at set variables step.

    If you want to process one-by-one you have to use set variables using 1 row, do your stuff... process the next row....

    Regards,
    Sven

  7. #7

    Default

    Thanks Sven!

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.