Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: getRow question

  1. #1

    Default getRow question

    We have a plugin that takes rows as input and adds a few values to it or if it is used where there are no previous steps, will generate a single row. We were trying to use the getRow method to tell us if there is a previous step (if the first time it is called, no row is returned it must not have any previous steps or no data in them at least)


    This doesnt work, line 954 in BaseStep.java is commented out, which would enable it, but with the line commented out it throws and index out of bounds exception.



    Is there a better way for our plugin to determine if there were previous steps?



    Thanks,



    Bo

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

    Default RE: getRow question

    Hi,

    This is not that hard to do actually because we have access to the transformation meta-data:

    String previousStepNames[] = getTransMeta().getPrevStepnames(getStepname());

    That way you can determine it at initialization time (init method, before you start to run) and you don't have to wait for a row or not.

    Hope this helps,

    Matt

  3. #3

    Default RE: getRow question

    That helps alot. thank you.

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.