Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: set variables in Job

  1. #1

    Question set variables in Job

    Hello to all.

    I have the following thing:

    Transformation 1 -> Job -> transformation 3

    Transformation 1 has checked "execute for every row".

    The job takes as an entry several rows that come from the transformation 1. This one has checked "execute for every row" and "Copy previous result".

    The Job calls to a transformation 2 that it includes:
    -get rows
    -set variabe
    -copy rows

    The transformation 2 has checked "execute for every row" and " Copy previous result".

    The transformation 3 has:
    -get rows
    -table output

    The transformation 3 has checked " execute for every row " and "Copy previous result ".

    The problem is that the information is not stored in the table.

    The information that enter the transformation 2 seems to get lost when I place the job, someone knows for that this happens?

    PD: I do not check "clear list of result rows" anywhere.

    THIS IS WHAT THE LOG THROWS:

    2008/01/11 12:23:07 - SharedObjects - Reading the shared objects file [file:///C:/Documents and Settings/Lic. Oscar Ruiz/.kettle/shared.xml]
    2008/01/11 12:23:08 - Job 1 - Loading 0 notes
    2008/01/11 12:23:08 - Job 1 - Loading 4 job entries
    2008/01/11 12:23:08 - Job 1 - Loading 3 job hops
    2008/01/11 12:23:08 - Chef - Starting job...
    2008/01/11 12:23:08 - LocalVariables - ---> Create new KettleVariables for thread [Job 1 (Job 1 (Thread-6))] for parent thread [main], same namespace? [false]
    2008/01/11 12:23:08 - Thread[Job 1 (Job 1 (Thread-6)),5,main] - exec(0, 0, Start.0)
    2008/01/11 12:23:08 - Thread[Job 1 (Job 1 (Thread-6)),5,main] - Sleeping: 0 minutes
    2008/01/11 12:23:08 - Job 1 - Starting entry [Transformation 1]
    2008/01/11 12:23:08 - Thread[Job 1 (Job 1 (Thread-6)),5,main] - exec(1, 0, Transformation 1.0)
    2008/01/11 12:23:08 - Transformation 1 - Opening filename : [null]
    2008/01/11 12:23:08 - Transformation 1 - Opening transformation: [Transformation 1] in directory [/]
    2008/01/11 12:23:08 - Transformation 1 - Loading transformation from repository [Transformation 1] in directory [/]
    2008/01/11 12:23:08 - Transformation 1 - Looking for the transformation [Transformation 1] in directory [/]
    2008/01/11 12:23:08 - Transformation 1 - Loading transformation [Transformation 1] from repository...
    2008/01/11 12:23:08 - SharedObjects - Reading the shared objects file [file:///C:/Documents and Settings/Lic. Oscar Ruiz/.kettle/shared.xml]
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 57
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 58
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 59
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 60
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 61
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 62
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 63
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 64
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 65
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 66
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 67
    2008/01/11 12:23:08 - Transformation 1 - Loading step with ID: 68
    2008/01/11 12:23:08 - Transformation 1 - ID_DIRECTORY=0
    2008/01/11 12:23:08 - Transformation 1 - Loaded the transformation [Transformation 1] , directory == null : false
    2008/01/11 12:23:08 - Transformation 1 - Loaded the transformation [Transformation 1] in directory /
    2008/01/11 12:23:08 - Job 1 - Starting entry [Job 2]
    2008/01/11 12:23:08 - Thread[Job 1 (Job 1 (Thread-6)),5,main] - exec(2, 0, Job 2.0)
    2008/01/11 12:23:08 - Job 2 - Loading job from repository : [/ : Job 2]
    2008/01/11 12:23:08 - SharedObjects - Reading the shared objects file [file:///C:/Documents and Settings/Lic. Oscar Ruiz/.kettle/shared.xml]
    2008/01/11 12:23:08 - Job 2 - Loading 0 notes
    2008/01/11 12:23:08 - Job 2 - Loading 2 job entries
    2008/01/11 12:23:08 - Job 2 - Loading 1 job hops
    2008/01/11 12:23:08 - Job 2 - Starting job, loaded from repository : [/ : Job 2]
    2008/01/11 12:23:08 - Job 1 - Starting entry [Transformation 3]
    2008/01/11 12:23:08 - Thread[Job 1 (Job 1 (Thread-6)),5,main] - exec(3, 0, Transformation 3.0)
    2008/01/11 12:23:08 - Transformation 3 - Opening filename : [null]
    2008/01/11 12:23:08 - Transformation 3 - Opening transformation: [Transformation 3] in directory [/]
    2008/01/11 12:23:08 - Transformation 3 - Loading transformation from repository [Transformation 3] in directory [/]
    2008/01/11 12:23:08 - Transformation 3 - Looking for the transformation [Transformation 3] in directory [/]
    2008/01/11 12:23:08 - Transformation 3 - Loading transformation [Transformation 3] from repository...
    2008/01/11 12:23:08 - SharedObjects - Reading the shared objects file [file:///C:/Documents and Settings/Lic. Oscar Ruiz/.kettle/shared.xml]
    2008/01/11 12:23:08 - Transformation 3 - Loading step with ID: 92
    2008/01/11 12:23:08 - Transformation 3 - Loading step with ID: 93
    2008/01/11 12:23:08 - Transformation 3 - ID_DIRECTORY=0
    2008/01/11 12:23:08 - Transformation 3 - Loaded the transformation [Transformation 3] , directory == null : false
    2008/01/11 12:23:08 - Transformation 3 - Loaded the transformation [Transformation 3] in directory /
    2008/01/11 12:23:08 - Job 1 - Finished jobentry [Transformation 3] (result=true)
    2008/01/11 12:23:08 - Job 1 - Finished jobentry [Job 2] (result=true)
    2008/01/11 12:23:08 - Job 1 - Finished jobentry [Transformation 1] (result=true)
    2008/01/11 12:23:08 - Chef - Job has ended.

    Regards,
    Neldy
    Last edited by neldy; 01-11-2008 at 12:25 PM.

  2. #2

    Default

    If I understand correctly what you want to do is a list of 'X' number of elements within "Transformation 1" and that the results are written on a table inside "Transformation 3."
    Then look at the example you have set, all you need to consider two things:

    -- Modifies routes files to functions inside your machine.
    -- Due to the fact that it always comes back to the same text file; always replacing this so this is just file with the final value (here just replaced to save the values in your table).
    Attached Files Attached Files

  3. #3

    Smile

    Hi blue_box.

    THANK YOU VERY MUCH for your example, I have solved the mistake.

    Regards,
    Neldy

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.