Parameters in Job Templates
When a job template includes a pipeline that uses runtime parameters, you can create multiple job instances at the same time, specifying different parameter values for each instance. Using job templates with parameters allows you to hide the complexity of job details from business analysts, such that business analysts can start job instances by configuring a few parameter values instead of needing to understand all of the job details.
When a job template includes a pipeline that does not use runtime parameters, you can create a single job instance at a time. To create multiple job instances from the job template, you must launch the Create Job Instances wizard multiple times. Each job instance uses an identical job configuration. Using job templates without parameters also allows you to hide the complexity of job details from business analysts. However, running identical job instances can result in the same data being processed multiple times.
For more information about defining parameter values in jobs, see Runtime Parameters.
Dynamic and Static Parameters
When you create a job template for a pipeline that uses runtime parameters, you define the default parameter values to use for each job instance created from the template. You also configure each parameter to function as one of the following types:
- Dynamic parameter
- A dynamic parameter can be overridden in a child job instance. When users create job instances from the template, they can override the default parameter values defined for dynamic parameters, specifying unique values for each job instance.
- Static parameter
- A static parameter cannot be overridden in a child job instance. When users create job instances from the template, they can view the default parameter values defined for static parameters, but they cannot override the values. Define a parameter as a static parameter when you want to force all job instances created from the job template to use a specific parameter value.
For example, the following image shows the parameter defaults defined in a job template. The bucket parameter is a dynamic parameter. When users create a job instance from the template, they can modify the value of the bucket parameter for that instance. The errordir parameter is a static parameter. When users create a job instance from the template, they cannot modify the value of the errordir parameter. All job instances use the default value defined in the job template, /tmp/errors.
Updating Job Template Parameters
When you edit job template properties, Control Hub applies the same updates to all attached job instances. However, when you edit parameter values for a job template, Control Hub applies the parameter updates to attached job instances based on the following types of edits:
- Static parameter value edited
- If you edit the value of a static parameter, Control Hub updates all attached job instances to use the edited parameter value. For
example:
- You create a job template and define a static parameter named errordir with a default value of /tmp/errors.
- You create an attached job instance that uses the parameter default value, /tmp/errors.
- You edit the job template, changing the default value of the errordir parameter to /errors.
- Dynamic parameter changed to static parameter
- If you change a dynamic parameter to static, Control Hub updates all attached job instances to use the default static parameter value.
For example:
- You create a job template and define a dynamic parameter named bucket with a default value of west-data-center.
- You create an attached job instance, overriding the parameter default value to east-data-center.
- You edit the job template, changing the bucket parameter to be a static parameter.
- Dynamic parameter value edited when attached job instances use the default value
- If you edit the value of a dynamic parameter, Control Hub updates all attached job instances that use the default parameter value to
use the edited value. For example:
- You create a job template and define a dynamic parameter named bucket with a default value of west-data-center.
- You create an attached job instance, using the parameter default value, west-data-center.
- You edit the job template, changing the default value of the bucket parameter to north-data-center.
- Dynamic parameter value edited when attached job instances override the default value
- If you edit the value of a dynamic parameter, Control Hub does not update attached job instances that override the default parameter
value. For example:
- You create a job template and define a dynamic parameter named bucket with a default value of west-data-center.
- You create an attached job instance, overriding the parameter default value to east-data-center.
- You edit the job template, changing the default value of the bucket parameter to north-data-center.