Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Set configuration variables in parent job and run subjob independently

  1. #1

    Default Set configuration variables in parent job and run subjob independently

    I was looking how to configure a parent job and a subjob such that subjob could be run independently from its parent. In a subjob I tried to use parameters with default values but it does not seems to work.

    expectations:
    - run parent job -> configuration are propagated from parent to subjob (pass parameter option enabled)
    - run subjob -> configuration are taken from default values

    In actual execution configurations are propagated correctly just in case when no parameters are defined in the subjob which means that subjob cannot be run separately. Do you suggest any other way how to design a job?

    Attached is a simple scenario of both jobs.
    Name:  000447.jpg
Views: 177
Size:  15.3 KB
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by mertez; 04-05-2016 at 06:01 AM.

  2. #2
    Join Date
    Aug 2011
    Posts
    360

    Default

    The long long story of parameters!

    - define parameters in your sub job (say param1)
    - in your main job, define your variables (say var1). Then in the subjob job entry, you need to set explictly the values
    of subjob parameters. In jobentry parameters tab, set param=param1, value=${var1}, such that value of var1 is passed to the parameter param1.

    The pass parameters down option works only for parameters defined in your main job to be passed to the same name parameter of sub job.
    It doesnt pass the main job VARIABLES down to the sub job parameters.

  3. #3

    Default

    Mathias thanks for the clarification. For me the option "pass all parameter values" meant that variables would be passed too.

    Here is the working pic of the job.
    Name:  000448.jpg
Views: 172
Size:  29.0 KB
    Attached Images Attached Images  

  4. #4
    Join Date
    Aug 2011
    Posts
    360

    Default

    In this configuration, you dont need to specify param var1 on the jobEntry, since var1 is also a parameter of parent job.
    But if you dont define paremeter var1 for your parent job, but define a variable var1 with set variable in the parent job, then
    you HAVE to specify value ${var1} on the sub job entry.

Tags for this Thread

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.