Job Flow parameters are used to define parameters that have the scope within the Job Flow. These parameters values can be used across all jobs in the Job Flow to parameterize various properties in them. They can also be used in expressions defined for other parameters in job flow.

  • The Job Flow parameters are hierarchically highest within a Job Flow.
  • The expression defined for Job Flow parameter can consist of any alpha numeric value, other job flow parameters, project parameters or Diyotta system parameters.
  • Only those Job Flow parameters that are higher in the order in the list of Job Flow parameters should be used in the expression of other job flow parameters.

You can create and use Job Flow parameters in the following way.

Step I: Add or Copy a Job Flow parameter

To add a Job Flow parameter, on the Job Flow Properties menu, click Parameters. To add a new parameter, click on Click Here, or click Paste to paste the parameter you have already copied.

NoteTo get to the Properties menu, either click on the empty area of the Job Flow canvas, or click on the Job Flow name in the search jobs drop-down.

Note: Job Flow parameter can be copied across or within same Job Flows. To copy a Job Flow parameter, select the parameter and use the Copy action to copy the parameter.

Step II: Provide the name and datatype for the parameter

The canvas shows the added parameter.

1. Click on the param name text box, to modify the name. The names for each job flow parameter in the job flow has to be different.

2. Depending on the parameter value, specify the data type, precision and scale.

Note: Following operations are allowed on the Parameter entries: Add, Cut, Copy, Paste, Up, Down, Delete, and Search.

Step III: Set the value for the parameter

1. Click on the arrow icon next to the Default field.

2. The Expression Editor window will open, and you can define the parameter value here. The expression defined can include Project Parameter, other Job Flow parameters, Job Flow sql parameters and Diyotta System Parameters.

Once you enter the expression, click Validate to verify that there are no syntax errors. If everything is correct then, a success message is displayed.

Here for example, the value is being defined as concatenation of the text 'TGT_DEPARTMENT', System Parameter $$CurrentDate and text '.dat'.

The expression defined for parameter value can include other parameters such as Job Flow SQL Parameters, Project Parameters, and Diyotta System Parameters. For more information, refer Working with Job Flow SQL Parameters, Working with Project Parameters, and Working with Studio System Parameters.

Step IV: Use the Job Flow parameter to parameterize different properties in the Job flow, or the Jobs in it. For illustrating the use of Job Flow parameter in the Job Flow, refer the use cases below.

  • In an expression editor of jobs and options in the job flow, the job flow parameters can be selected from the job flow parameters list in the parameters section.
  • When job flow parameter needs to be specified in fields, where expression editor is not available, then type in the job flow parameter name with $FL_ prefixed.

Use Case I: Using job flow parameter to define the name of the target file generated as part of execution of associated data flow instance.

Step I: On Canvas, click on the job, and then under Properties, click Connections. Click 'L', that is the Load properties of target object 'TGT_DEPARTMENT'.

Step II: The Load Properties window opens.

Specify the job flow parameter in the "value" field for the property "File Name". Here there is no expression editor so, the job flow parameter needs to be typed in. Prefix it with $FL_ as - $FL_File_Name. During run-time, the value for property "File Name" will be replaced with the value defined for the parameter - "TGT_SRC_DEPARTMENT_$$CurrentDate.dat". Here, $$CurrentDate variable will get replaced with corresponding Diyotta defined value during run-time.

Use Case II: Using Job Flow parameter in the Task Command.

Step I: On Canvas, click on the task command job, and then under Properties, click on the Command Tab.  Open the editor for the command by clicking on the arrow.

The Expression Editor window opens.

Step II: Provide the command to be executedFor illustration, here we are checking if the file as specified in the job flow parameter exists and deleting it.

The expression editors will have section to display all the applicable parameters. To list all the job flow parameters, click on the Job Flow Parameters.

Click on the Job Flow Parameter name to use it in the expression. During run-time, parameter will be replaced with the value defined for it - "TGT_DEPARTMENT_$$CurrentDate.dat". Here, $$CurrentDate variable will get replaced with corresponding Diyotta defined value during runtime.

If the parameter name ($FL_****) used anywhere in the job flow, or associated jobs does not match any of the job flow parameters defined in the job flow then, during the execution these references will be replaced by default value of -1.