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

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

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

Step I: Add or Copy a Data Flow parameter

To add a Data Flow parameter, on the Data 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.

Note: To get to the Properties menu, either click on the empty area of the Data Flow canvas, or click on the Data Flow name in the search field drop-down.

Note: Data Flow parameter can be copied across or within same Data Flows. To copy a Data Flow parameter, select the parameter and click the Copy icon. 

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 data flow parameter in the Data 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 Expression Editor 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 Data Flow parameters, Data 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 "prdcd_242511".

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

Step IV: Use the Data Flow parameter to parameterize different properties in the Data flow, or the objects in it. 

For illustrating the use of Data Flow parameter in the Data Flow, refer the use cases below.

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

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

Step I: In data flow edit page, select Target instance and click Load Properties.

Step II: Specify the data flow parameter in the "value" field for the property "File Name". Here there is no expression editor so, the data flow parameter must be manually entered and prefixed with $MP and it appears as $MP_Product_codeDuring run-time, the value for property "File Name" is replaced with the value defined for the parameter - "prdcd_242511.dat".

Use Case II: Using Data Flow parameter in the Where Clause.

Step I: In data flow edit page, select Source instance and click Properties

  • To edit the where clause, click the icon beside the Where clause and the Expression Editor wizard appears. 

Step II:  Add the required expression and for illustration, here we are filtering data based on specified value in data flow parameter.

The expression editors contains a section to display all the applicable parameters. To list all the data flow parameters, from the Parameters drop down list, click on the Data Flow Parameters.
  • Click on the Data Flow Parameter name to use it in the expression. During run-time, parameter $MP_Product_Code is replaced with the defined value "prdcd_242511". 
  • To verify that there are no syntax errors, click Validate and success message appears.

Note:

  • If the parameter name ($MP_****) used anywhere in the data flow or associated data flows does not match any of the data flow parameters defined in the data flow then, during the execution these references will be replaced by default value of -1.
  • Data flow parameters created can be overridden in job flow through the data flow instance job created with data flow. For more details on this, refer Overriding Data Flow Parameters in Data Flow Instance Job.