0

I am new at pentaho and have some problems during building my job. I have job1, which consists of job2 and other transformation. Job2 contains 3 transformations: 1, 2 and 3. The transformation3 makes some steps and calls another transformation4 (through Transformation executor step). Transformation4 compares some values and then a new variable „result“ is set. Problem is that I need to use this variable in Job1. I have tried to use „set variables“ step with valid in parent, root, system jobs, but the value is always empty. Are there any opportunities to pass this variable in start-job (job1)? Thank you for your help.

Jane
  • 23
  • 2
  • 5

1 Answers1

1

From the above Job/Transformation Flow description it would not be possible to set a value from T4 to J1 as Jobs are executed sequentially and Set_variable on the 1st iteration of T4 can not pass data to Get_Variables of J2. If J1 has been marked as "Run for each Row" (default) and data being read from a source like, Table - make sure the DML is commited. File - make sure file is closed.

Hope this answers the question

  • http://type-exit.org/adventures-with-open-source-bi/2010/06/run-kettle-job-for-each-row/ gives a good idea of executing same job for different parameters – Deepak Sridharan Nov 14 '16 at 19:40
  • Thnak you for a commet, I have checked, everything is closed, but I get an empty value. Problem is that I can not read variable even after Transformation Executor step.In Set Variable step in last Transformation4, I see in Log-file: set var value is true, but in the next Transformation5 value is empty. – Jane Nov 15 '16 at 08:58
  • How are you getting the variable value in T5 is it using Get Variable step?, also is T5 present inside J2? the above mentioned question does not have T5? – Deepak Sridharan Nov 16 '16 at 15:17
  • Its right. But I just wanted to describe the main problem. I can not only pass variable from the lowest Job, I mean from job2 to job1, but also from transformation4 to Transformation3. the Problem starts from here. Now the Transformation3 calls transformation4, I Need to set here in tr4 a variable and pass it at least to transformation3 back. – Jane Nov 17 '16 at 07:25