Hitachi Vantara Pentaho Community Forums
Results 1 to 9 of 9

Thread: getInputRowMeta()

  1. #1
    Join Date
    Jun 2009
    Posts
    20

    Default getInputRowMeta()

    Hi, i have in a previous step a "Table Input".
    "Table Input" read 1500 rows. The next step is "Modified Javascript".

    I want read all rows of a table but with this loop:

    for (var i=0;i<getInputRowMeta().size();i++) {


    }

    I have read only 17 rows, how to ?

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

    Default

    Let me guess, you have 17 fields in the table?

  3. #3
    Join Date
    Jun 2009
    Posts
    20

    Default

    No i have 1557 records in table !!!

  4. #4
    Join Date
    Feb 2009
    Posts
    296

    Default

    records in the table are not the same as fields in one record.

    The code you presented iterates all the fields of one record.

    Can you tell us what you're actually trying to accomplish? Maybe there is an easy way to help you with the task ahead instead of trying to fix the problem you're presenting.
    Fabian,
    doing ETL with his hands bound on his back

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

    Default

    With a hint as subtle as a charging rhino, I really thought dungino would get that.

  6. #6
    Join Date
    Jun 2009
    Posts
    20

    Default How to read a row of a table ?

    Hi, reguards for answer, how to read all rows of table in javascript?

    Wrong code:
    for (var i=0;i<getInputRowMeta().size();i++) {


    }

    The previous code count a columms of table, but for read a rows of table how to do ? It is possible ?

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

    Default

    Every "cycle" you get 1 row back in javascript step... you can store past data (there's an example on the wiki showing how), but in general it's not that nice a solution in PDI.

    So ... what is actually the thing that you want to do...

    Regards,
    Sven

  8. #8
    Join Date
    Feb 2009
    Posts
    296

    Default

    Please check the documentation about how PDI works. Each step gets all the data one row at a time. And before you ask: there is no "first do this, then that" - the rows flow through all the steps in parallel - all steps work at the very same time.

    So there is nothing you need to do to get all the rows.

    Again: What are you trying to do? Maybe there is a step suited to help you? Or a combination of steps?
    Fabian,
    doing ETL with his hands bound on his back

  9. #9
    Join Date
    Dec 2012
    Posts
    3

    Default

    Hello all,
    I am kind of new to Pentaho and just introducing myself... you will all likely be hearing plenty from me in the near future. Awesome application!
    donald

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.