Overriding Parameters, Parameter Files from IICS Taskflows

Spread the love

Introduction

Informatica Cloud allows overriding the Input and In-Out parameters defined in a mapping and Parameter Files defined in a mapping task by passing values from the taskflows.

You can use Data Task step or an Assignment step in taskflow to pass values to the mapping task containing parameters and parameter file defined to override their values.

Let us understand the process of overriding Parameters, Parameter Files from IICS Taskflows in this article using an example.

Overriding Connections using Taskflows in Informatica Cloud

In our earlier article, we have discussed how to parameterize connections and data objects using parameter file.

Let us now understand how to parameterize connections and data objects using taskflows by overriding parameters and parameter files.

Source and Target details

Consider a mapping with simple source and target transformations. Parameterize the source and target connections and data objects by creating Input parameters.

  • Src_Connection Input parameter of type connection to parameterize source connection.
  • Src_Object Input parameter of type data object to parameterize source object.
  • Tgt_Connection Input parameter of type connection to parameterize target connection.
  • Tgt_Object Input parameter of type data object to parameterize target object.
Input Parameters defined in a mapping
Input Parameters defined in a mapping

Make sure Allow parameter to be overridden at run time option is unselected while creating the parameters. Else you will not be able to override the parameter values from taskflow.

This option, when selected, lets the value defined in mapping task to be overridden by the value defined in the parameter file but not from taskflow.

  • To override the parameter values using Parameter file, select this option.
  • To override the parameter values using taskflow, unselect this option.
Input Parameter with Allow parameter to be overridden at run time disabled
Input Parameter with Allow parameter to be overridden at run time disabled

In the Mapping Task, you need to assign values to these parameters. The Mapping task uses Oracle Connection to read data from EMPLOYEES table and FlatFile_Connection to write to emp.csv file.

These values can later be overridden from the taskflow. Keep in mind that the default data object defined in the Mapping task and the data object you wish to override should have same metadata with same field names and data types.

Method-1: Overriding the Parameters

Follow below steps to override the parameters from taskflow

1. Create a taskflow and add a Data Task step to the canvas.

2. Go to Data Task step and add the mapping task with the parameters.

3. Go to Input Fields, click the Add icon. You could see the input parameters defined in the mapping as below.

List of Input Parameters that could be added in Input Fields section of Data Task
List of Input Parameters that could be added in Input Fields section of Data Task

4. Perform the following steps to override the connection parameter

  • Select the connection parameter from the list of parameters.
  • Click Edit. The Edit Value dialog box opens.
  • Select Field type as Content.
  • Select the Connection Value from the list of connections available.

5. Perform the following steps to override the data object parameter

  • Select the data object parameter from the list of parameters.
  • Click Edit. The Edit Value dialog box opens.
  • Select Field type as Content.
  • Enter the value for the data object you wish to create.

6. Repeat same steps for all the additional connection and data object parameters you wish to override from taskflow

The below image shows the target connection and target object values are overridden with new values FF_TargetFiles and object TF_Override.csv respectively in taskflow.

Overriding Input parameters from taskflow
Overriding Input parameters from taskflow

You only need to add parameters that you want to override to the Input Fields section.

The below image shows that the task completed successfully and the target connection and data object values defined in the taskflow are picked.

Run details of job from IICS Monitor showing the parameter values are overridden from taskflow
Run details of job from IICS Monitor showing the parameter values are overridden from taskflow

Method-2: Overriding the Parameter Files

Consider the Allow parameter to be overridden at run time option is selected while creating the parameters. In this scenario even if you pass the values to the parameters from taskflow to override, those values will not be considered.

The values to the parameters should be passed from a parameter file to override the parameter values. Consider you have defined a parameter file in the mapping task to override the parameter values.

Parameter File defined in the Mapping Task
Parameter File defined in the Mapping Task

The below image shows the runtime parameters read from the parameter file to override the parameters defined in the mapping.

Run details of job from IICS Monitor showing the parameter values are overridden from parameter file defined in the Mapping Task
Run details of job from IICS Monitor showing the parameter values are overridden from parameter file defined in the Mapping Task

Though you cannot override the parameters from the taskflow in this scenario, you could override the parameter file from taskflow which overrides the parameter values.

Create a new parameter file with parameter values you wish to override. Below are the contents of the parameter file mct_ParamFile_Override_demo_2.param which overrides the existing parameter file from taskflow

#USE_SECTIONS
[POC].[c]
$$Src_Connection=Oracle_Connection
$$Src_Object=EMPLOYEES
$$Tgt_Connection=FF_TargetFiles
$$Tgt_Object=Taskflow_Override.csv
[Global]

Follow below steps to override the Parameter File Directory and Parameter File Name from taskflow

1. Create a taskflow and add a Data Task step to the canvas.

2. Go to Data Task step and add the mapping task with the parameters.

3. Go to Input Fields, click the Add icon. You could see task properties parameters as below.

TaskProperties Parameters that could be added in Input Fields section of Data Task
TaskProperties Parameters that could be added in Input Fields section of Data Task

5. Perform the following steps to override the parameter file name

  • Select Parameter File Name under Task Properties Parameters.
  • Click Edit. The Edit Value dialog box opens.
  • Select Field type as Content.
  • Enter the name for the parameter file.

The below image shows that parameter file is overridden with new file mct_ParamFile_Override_demo_2.param in taskflow.

Overriding Parameter File Name from taskflow
Overriding Parameter File Name from taskflow

You could also override the Parameter File Directory path using the same steps. Since we only want to override the parameter file name, directory is not selected here.

The below image shows that the task completed successfully and the parameter values are picked from the Parameter File defined in the taskflow.

Run details of job from IICS Monitor showing the parameter values are overridden from parameter file defined in the Taskflow
Run details of job from IICS Monitor showing the parameter values are overridden from parameter file defined in the Taskflow

Override Precedence between a Parameter File and Taskflow in various scenarios

Only parameters of type Connection and Data Object have the Allow parameter to be overridden at run time option to choose whether to override the parameter values from a Parameter File or a Taskflow.

Rest of the parameter types can be overridden from both parameter file and taskflow. Similarly all In-Out Parameters also can be overridden from both parameter file and taskflow.

What if we try to override the parameter values from both Parameter File and TaskFlow?
Which one would take precedence?

Here is a complete override precedence details in all the various scenarios for Input and In-Out Parameters using Parameter File and Taskflow

ParameterAllow parameter to be overridden at run timeAssigned values in Parameter FileAssigned values in TaskflowOverride value Precedence
Input ParameterYesNoParameter File
Input ParameterNoYesTaskflow
Input ParameterYesYesTaskflow
Input ParameterNoNoRuns with default value assigned in Mapping Task
Input ParameterEnabledYesNoParameter File
Input ParameterEnabledNoYesRuns with default value assigned in Mapping Task
Input ParameterEnabledYesYesParameter File
Input ParameterEnabledNoNoRuns with default value assigned in Mapping Task
Input ParameterDisabledYesNoRuns with default value assigned in Mapping Task
Input ParameterDisabledNoYesTaskflow
Input ParameterDisabledYesYesTaskflow
Input ParameterDisabledNoNoRuns with default value assigned in Mapping Task
In-Out ParameterYesNoParameter File
In-Out ParameterNoYesTaskflow
In-Out ParameterYesYesParameter File

This might be little confusing if you initially look at it. But I am sure if you go case by case, it starts making sense and easy to understand.

Conclusion

To summarize, you can override the parameter values using both Parameter File and Taskflow. You should just keep in mind which would take precedence in which scenario.

You could also use the parameters defined in the parameter file directly in the mapping especially in the override queries without actually creating the parameter in the mapping. This case is not considered in our above discussion.

In this case you cannot override these parameter values from taskflow as they are not defined in the mapping at all. But you could override the complete parameter file to change the parameter values.

Related Posts:

  • Overview of Taskflows in Informatica Cloud (IICS)
  • HOW TO: Run Informatica Cloud Taskflow as an API?
  • HOW TO: Schedule a Taskflow in Informatica Cloud?

Leave a Comment

Related Posts