About this task
The Basic settings and Advanced settings tabs of all components display various check boxes and drop-down lists for component parameters. Usually, available values for these types of parameters can only be edited when designing your Job.
The Dynamic settings tab, on the Component view, allows you to customize these parameters into code or variable.
This feature allows you, for example, to define these parameters as variables and thus let them become context-dependent, whereas they are not meant to be by default.
Another benefit of this feature is that you can now change the context setting at execution time. This makes full sense when you intend to export your Job in order to deploy it onto a Job execution server for example.
To customize these types of parameters, as context variables for example, follow the following steps:
- Select the relevant component basic settings or advanced settings view that contains the parameter you want to define as a variable.
- Click the Dynamic settings tab.
- Click the plus button to display a new parameter line in the table.
- Click the Name of the parameter displaying to show the list of available parameters. For example: Print operations
Then click in the facing Code column cell
and set the code to be used. For example:
context.verbose if you create the corresponding
context variable, called verbose.
Note: As code, you can input a context variable or a piece of Java code.
The corresponding lists or check boxes thus become unavailable and are highlighted in yellow in the Basic settings or Advanced settings tab.
For use cases showing how to define a dynamic parameter, see Reading data from databases through context-based dynamic connections and Reading data from different MySQL databases using dynamically loaded connection parameters .