Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: multiple get rows from result with same copy rows to result

  1. #1
    Join Date
    Dec 2015
    Posts
    3

    Default multiple get rows from result with same copy rows to result

    Hi All, i was hoping some of you gurus can help me with this problem i'm facing, i'm new to pentane but i have experience with other ETL applications and i really am trying to make this work with spoon.

    Currently i have 3 transformation in 1 job, each transformation reads the same excel file ( need to loop thought it n times ), so the 1st and 2nd transformation end with 'copy rows to result' and the 2nd and 3rd start with 'get rows from result', problem is that because all my transformations uses the same excel sheet ( same field name ) to process data my 3rd transformation it seems getting the data from the 1st 'copy to rows' step because of the same field name, is it posible to clean memory after i use a 'get rows from result' so the next 'copy rows to result' will be clean?

    thanks

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    If you sequence your transformations in one job you should not have that issue.
    -- Mick --

  3. #3
    Join Date
    Dec 2015
    Posts
    3

    Default

    i do have it sequentially, but my 3rd transformation it's getting the information from the first 'copy rows to result' and not from the second. Maybe if i explain what i want to achieve you can help me more.
    I have an excel file with column employeeID and supervidorID,

    employeeID SupervisorID
    1 1
    2 1
    3 1
    4 2
    5 3
    6 4

    At the end i need this same info but with an added column Organization Level, where as you can see employeeID 1 is Level 1 because his supervisor is himself but employee 2 and 3 are level 2 and employee 4 and 5 are level 3, so i need to loop through the same excel sheet n times.

    What i have right now is something like

    Transformation1 --> get the level 1 manager and sending via 'copy rows to result' the row to transformation2
    Transformation2 --> get the 2nd level manager using 'get rows from result' that i receive from transformation1, at the end i send all the 2nd level rows to a 'copy rows to result' to Transformation3
    Transformation3 --> getting level 3 rows using parameters from Transformation2, problem is that the 'get rows from result' is returning the result from Transformation1 and not Transformation2

    then i want to loop between Transformation2 and 3 to get the rest of the levels.

    thanks

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    You may want to investigate step Closure-Generator.
    So long, and thanks for all the fish.

  5. #5
    Join Date
    Dec 2015
    Posts
    3

    Default

    Awesome, this was exactly what i need, than you very much, i can't believe i was doing loops and crazy stuff.. Thanks

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.