Developer Mapping Guide > Mapping Parameters > Parameter Files
  

Parameter Files

A parameter file is an XML file that lists user-defined parameters and their assigned values. Parameter files provide the flexibility to change parameter values each time you run a mapping.
The parameter values define properties for a workflow or for a mapping included in a Mapping task that the workflow runs. The Data Integration Service applies these values when you run a workflow from the command line and specify a parameter file.
The parameter values define properties for a mapping. The Data Integration Service applies these values when you run a mapping and specify a parameter file.
You can define mapping parameters and workflow parameters in a parameter file. If you want to specify reusable object parameters, expose the reusable object parameters as mapping parameters. Specify the mapping parameter values in the parameter file.
You cannot define system parameter values in a parameter file.
You can define parameters for multiple mappings in a single parameter file. You can also create multiple parameter files and then use a different file each time you run a mapping. The Data Integration Service reads the parameter file at the start of the mapping run to resolve the parameters.
You can export a parameter file from the Developer tool. Export the file from the mapping or the workflow Parameters tab. The Developer tool generates a parameter file that contains the mapping or workflow parameters and the default parameter values. You can specify the parameter file name and choose where to save the file.
Note: Parameter files for mappings and workflows use the same structure. You can define parameters for deployed mappings and for deployed workflows in a single parameter file.
You can also list the parameters and default values used in a mapping from the command line. You can use the command line output as a parameter file template.
Run the mapping from the command line to apply a parameter file.
Run a mapping with a parameter file from the Developer tool or run the mapping from the command line.

Parameter File Structure

A parameter file is an XML file that contains at least one parameter and its assigned value.
The Data Integration Service uses the hierarchy defined in the parameter file to identify parameters and their defined values. The hierarchy identifies the workflow or mapping that uses the parameter.
The Data Integration Service uses the hierarchy defined in the parameter file to identify parameters and their defined values. The hierarchy identifies the mapping or workflow that uses the parameter.
You define parameter values within a project or application top-level element. A project element defines parameter values to use when you run a specific mapping in the project. A project element also defines the parameter values to use when you run any mapping that uses the objects in the project.
An application element defines parameter values to use when you run a mapping in a specific deployed application. If you define the same parameter in a project top-level element and an application top-level element in the same parameter file, the parameter value defined in the application element takes precedence.
The Data Integration Service searches for parameter values in the following order:
  1. 1. The value specified within an application element.
  2. 2. The value specified within a project element.
  3. 3. The parameter default value.
A parameter file must conform to the structure of the parameter file XML schema definition (XSD). If the parameter file does not conform to the schema definition, the Data Integration Service fails the mapping run.
On the machine that hosts the Developer tool, the parameter file XML schema definition appears in the following directory:
<Informatica Installation Directory>\clients\DeveloperClient\infacmd\plugins\ms\parameter_file_schema_1_0.xsd
On the machine that hosts Informatica Services, the parameter file XML schema definition appears in the following directory:
<Informatica Installation Directory>\isp\bin\plugins\ms\parameter_file_schema_1_0.xsd

Project Element

A project element defines the parameter values to use when you run a specific mapping in the project. A project element also defines the parameter values to use when you run any mapping that uses the objects in the project.
The project element defines the project in the Model repository that contains objects that use parameters. The project element can include a workflow or mapping. You cannot include transformation, mapplet, or data object elements in the project element.
The following table describes the elements that a project element can contain:
Element Name
Description
folder
Defines a folder within the project. Use a folder element if objects are organized in multiple folders within the project. A folder element can contain a mapping or a workflow element, or another folder element.
mapping
Defines a mapping within the project that uses parameters. A mapping element contains one or more parameter elements that define parameter values for the mapping or for any non-reusable transformation, mapplet, or data object in the mapping that accepts parameters.
workflow
Defines a workflow within the project that uses parameters. A workflow element contains one or more parameter elements that define parameter values for the workflow.
When you run a workflow with a parameter file that defines parameter values in a project top-level element, the Data Integration Service applies the parameter values to the specified workflow. The service also applies parameter values to any of the specified objects included in a mapping run by a Mapping task in the workflow.
For example, you want the Data Integration Service to apply parameter values when you run workflow "MyWorkflow". The workflow contains a Mapping task that runs mapping "MyMapping". The mapping contains a parameter "MyMapping_Param." You want to use the parameter values when you run "MyWorkflow" in any deployed application. You also want to use the parameter values when you run any other workflow that includes a Mapping task that runs a mapping using these objects in project "MyProject". Define the parameter within the following elements:
<project name="MyProject">

<!-- Apply this parameter value to workflow "MyWorkflow" in project "MyProject". -->
<workflow name="MyWorkflow">
<parameter name ="MyWorkflow_Param">Param_value</parameter>
</workflow>

<!-- Apply this parameter value when you run any workflow that runs mapping "MyMapping"
in project "MyProject". -->
<mapping name="MyMapping">
<parameter name ="MyMapping_Param">Param_value</parameter>
</mapping>
</project>
When you run a mapping with a parameter file that defines parameter values in a project top-level element, the Data Integration Service applies the parameter values to the specified mapping within the project.
For example, you want the Data Integration Service to apply the parameter defined by "MyMapping_Param" when you run the mapping "MyMapping". You can define the parameter in the parameter file using the following elements:
<project name="MyProject">

<!-- Apply this parameter value to mapping "MyMapping" in project "MyProject". -->
<mapping name="MyMapping">
<parameter name ="MyMapping_Param">Param_value</parameter>
</mapping>

</project>

Application Element

An application element provides a run-time scope for a project element. The application element defines the deployed application and the parameter values that the Data Integration Service applies to a mapping or workflow in the deployed application.
You can use application elements in a parameter file to define different sets of parameters that the Data Integration Service applies to a mapping or workflow depending on which application runs.
The application element can contain project, folder, mapping or workflow elements. The following table describes the elements that the application element can contain:
Element Name
Description
project
Defines a project in the Model repository. Use a project element to locate a folder, mapping, or workflow that resides in the project.
folder
Defines a folder within a project. Use a folder element if objects are organized in multiple folders within the project. A folder element can contain a mapping or a workflow element, or another folder element.
mapping
Defines a mapping in the application that uses parameters. A mapping element contains one or more parameter elements that define parameter values for the mapping or for any non-reusable transformation, mapplet, or data object in the mapping that accepts parameters.
You can specify the same mapping in different application elements to use different parameters depending on which application runs.
workflow
Defines a workflow within the project that uses parameters. A workflow element contains one or more parameter elements that define parameter values for the workflow.
You can specify the same workflow in different application elements to use different parameters depending on which application runs.
For example, you want the Data Integration Service to apply parameter values when you run workflow "MyWorkflow" in deployed application "MyApp." You do not want to use the parameter values when you run the workflow in any other application or when you run another workflow in project "MyProject." Define the parameters within the following elements:
<application name="MyApp">
<workflow name="MyWorkflow">
<project name="MyProject">
<workflow name="MyWorkflow">
<parameter name ="MyWorkflow_Param">Param_value</parameter>
</workflow>

<mapping name="MyMapping">
<parameter name ="MyMapping_Param">Param_value</parameter>
</mapping>
</project>
</workflow>
</application>

For example, you want the Data Integration Service to apply parameter values when you run mapping "MyMapping" in deployed application "MyApp." You do not want to use the parameter values when you run the mapping in any other application or when you run another mapping in project "MyProject." Define the parameters within the following elements:
<application name="MyApp">
<mapping name="MyMapping">
<project name="MyProject">
<mapping name="MyMapping">
<parameter name ="MyMapping_Param">Param_value</parameter>
</mapping>
</project>
</mapping>
</application>

Rules and Guidelines for Parameter Files

Certain rules and guidelines apply when you create parameter files.
Use the following rules when you create a parameter file:

Sample Parameter File

The following example shows a sample parameter file used to run mappings.
<?xml version="1.0"?>
<root description="Sample Parameter File"
xmlns="http://www.informatica.com/Parameterization/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
The Data Integration Service uses this section only when you run workflow "Workflow1" or
"Workflow2" in project "Project1" in deployed application "App1."

This section assigns values to parameters created in workflows "Workflow1" and "Workflow2."
-->
<application name="App1">
<workflow name="Workflow1">
<project name="Project1">
<workflow name="Workflow1">
<parameter name="WORKFLOW1_PARAM1">WORKFLOW1_PARAM1_VAL</parameter>
<parameter name="WORKFLOW1_PARAM2">WORKFLOW1_PARAM2_VAL</parameter>
</workflow>
</project>
</workflow>
<workflow name="Workflow2">
<project name="Project1">
<workflow name="Workflow2">
<parameter name="WORKFLOW2_PARAM1">WORKFLOW2_PARAM1_VAL</parameter>
<parameter name="WORKFLOW2_PARAM2">WORKFLOW2_PARAM2_VAL</parameter>
</workflow>
</project>
</workflow>
</application>

<!--
The Data Integration Service uses this section only when you run workflow "Workflow1"
in project "Project1" in deployed application "App2." "Workflow1" includes a Mapping
task that runs mapping "Map1".

This section assigns values to parameters created in the following objects:
* Workflow "Workflow1"
* Mapping "Map1"
-->
<application name="App2">
<workflow name="Workflow1">
<project name="Project1">
<workflow name="Workflow1">
<parameter name="WORKFLOW1_PARAM1">WORKFLOW1_PARAM1_VAL</parameter>
<parameter name="WORKFLOW1_PARAM2">WORKFLOW1_PARAM2_VAL</parameter>
</workflow>

<mapping name="Map1">
<parameter name="MAP1_PARAM2">MAP1_PARAM2_VAL</parameter>
</mapping>
</project>
</workflow>
</application>
</root>
<?xml version="1.0"?>
<root description="Sample Parameter File"
xmlns="http://www.informatica.com/Parameterization/1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!--
The Data Integration Service uses this section only when you run mapping "Map1" or "Map2"
in project "Project1" in deployed application "App1."

This section assigns values to parameters created in mappings "Map1" and "Map2."
-->
<application name="App1">
<mapping name="Map1">
<project name="Project1">
<mapping name="Map1">
<parameter name="MAP1_PARAM1">MAP1_PARAM1_VAL</parameter>
<parameter name="MAP1_PARAM2">MAP1_PARAM2_VAL</parameter>
</mapping>
</project>
</mapping>
<mapping name="Map2">
<project name="Project1">
<mapping name="Map2">
<parameter name="MAP2_PARAM1">MAP2_PARAM1_VAL</parameter>
<parameter name="MAP2_PARAM2">MAP2_PARAM2_VAL</parameter>
</mapping>
</project>
</mapping>
</application>

<!--
The Data Integration Service uses this section only when you run mapping "Map1" in
project "Project1" in deployed application "App2."

This section assigns values to parameters created in the following objects:

* Mapping "Map1"
-->
<application name="App2">
<mapping name="Map1">
<project name="Project1">
<mapping name="Map1">
<parameter name="MAP1_PARAM2">MAP1_PARAM2_VAL</parameter>
</mapping>
</project>
</mapping>
</application>
</root>

Export a Parameter File

You can export a mapping parameter file or a workflow parameter file from the Developer tool. Define the parameters in the Developer tool and then export them to a file. The Developer tool creates a parameter file in .XML format.
You can export a parameter file that contains mapping parameters or workflow parameters. You can export parameters from the mapping Parameters tab or from the workflow Parameters tab. The Developer tool exports all the parameters from the Parameters tab.
To export a parameter file, perform the following steps:
  1. 1. Define the parameters and the parameter defaults for a mapping or a workflow.
  2. 2. On the Parameters tab of the mapping or workflow Properties, click the Export Parameter File option.
  3. 3. Enter a name for the parameter file and browse for a location to put the file.
  4. 4. Click Save.
The following image shows the Export Parameter File option on the Parameters tab for a workflow:
The workflow Parameters tab has an option called Export Parameter File. The screenshot shows a string workflow parameter called Workflow_Parm. It has a default value of 100.
When you export a parameter file, the Developer tool creates a parameter file with either mapping parameters or workflow parameters in it. The Developer tool does not export mapping and workflow parameters to the same file.
For example, when you export the workflow parameter, Workflow_Parm, the Developer tool creates the following parameter file:
<?xml version="1.0" encoding="UTF-8"?>
-<root version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema" xmlns="http://www.informatica.com/Parameterization/1.0">
-<project name="Orders">
-<workflow name="Customer_Workflow">
<parameter name="Workflow_Parm">100</parameter>
</workflow>
</project>
</root>

Creating a Parameter File from infacmd ms ListMappingParams

The infacmd ms ListMappingParams command lists the parameters for a mapping in a deployed application and the default value for each parameter. Use the output of this command to create a parameter file.
    1. Run the infacmd ms ListMappingParams command to list the parameters for a mapping and the default value for each parameter.
    The -o argument sends command output to an XML file.
    For example, the following command lists the parameters in workflow MyWorkflow in file "MyOutputFile.xml":
    infacmd wfs ListWorkflowParams -dn MyDomain -sn MyDataIntSvs -un MyUser -pd MyPassword -a MyApplication -wf MyWorkflow -o MyOutputFile.xml
    For example, the following command lists the parameters in mapping MyMapping in file "MyOutputFile.xml":
    infacmd ms ListMappingParams -dn MyDomain -sn MyDataIntSvs -un MyUser -pd MyPassword -a MyApplication -m MyMapping -o MyOutputFile.xml
    The Data Integration Service lists all mapping parameters with their default values.
    2. If you did not specify the -o argument, you can copy the command output to an XML file and save the file.
    3. Edit the XML file and replace the parameter default values with the values you want to use when you run the mapping.
    4. Save the XML file.