How to Run a Mapping with Parameters
You can run a mapping with parameters from the Developer tool or the command line.
To run a mapping with parameters from the Developer tool, run the mapping using advanced options. In the advanced options, specify the parameters. To run the mapping from the command line, specify the mapping and the parameter set or parameter file.
How to Run a Mapping with Parameters from the Developer Tool
Before you run a mapping with parameters from the Developer tool, validate the parameters. To validate the parameters, resolve the mapping parameters and validate the mapping. Then run the mapping using advanced options. In the advanced options, specify whether you want to use the default parameter values, a parameter set, or a parameter file.
Resolving and Validating Parameters
You can resolve and validate mapping parameters to ensure that the Data Integration Service can read and process the parameters at run time. The mapping must be valid before you resolve the parameters. When you resolve the mapping parameters, the Developer tool generates an instance of the mapping that shows how the Data Integration Service resolves the parameters at run time.
If you run a mapping multiple times using different parameter sets or parameter files, validate the mapping with resolved parameters each time to make sure that the parameter sets or parameter files are compatible with the mapping.
1. In the Developer tool, right-click a mapping in the editor or the Object Explorer view. Select Show Mapping with Resolved Parameters.
The Show Mapping with Resolved Parameters dialog box appears.
2. Select one of the following mapping parameters options:
- - Apply the default values in the mapping. The Data Integration Service applies the default parameter values configured in the mapping.
- - Apply a parameter set. The Data Integration Service applies the parameter values configured in the parameter set.
- - Apply a parameter file. The Data Integration Service applies the parameter values configured in the parameter file.
3. Click OK.
The Developer tool generates a run-time instance of the mapping that shows the resolved parameters. The run-time instance of the mapping appears in a new tab.
4. Right-click the run-time instance of the mapping and select Validate.
If errors appear in the Validation Log view, fix the errors and validate the mapping again.
5. To run the mapping with the selected parameters, right-click the run-time instance of the mapping and click Run.
Running a Mapping with Parameters
To run a mapping with parameters from the Developer tool, run the mapping using advanced options. In the Developer tool, you can run a mapping using the default parameter values in the mapping, a parameter set, or a parameter file.
If you run a mapping instance where the parameters are resolved, you cannot specify different parameters to run the mapping. The mapping runs using the parameters that are resolved in the mapping.
1. In the Developer tool, right-click a mapping in the editor or the Object Explorer view. Select Run Mapping Using Advanced Options.
The Run Mapping Using Advanced Options dialog box appears.
2. Select one of the following mapping configuration options:
- - Select a mapping configuration. Choose a reusable mapping configuration to run the mapping.
- - Specify a custom mapping configuration. Select the Data Integration Service, operating system profile, override tracing level, and optimizer level.
3. Select one of the following mapping parameters options:
- - Apply the default values in the mapping. The Data Integration Service applies the default parameter values configured in the mapping.
- - Apply a parameter set. The Data Integration Service applies the parameter values configured in the parameter set.
- - Apply a parameter file. The Data Integration Service applies the parameter values configured in the parameter file.
How to Run a Mapping with Parameters from the Command Line
To run a mapping with parameters from the command line, you must deploy the mapping as an application. After the application is deployed, run the mapping. Specify the mapping and the parameter set or parameter file.
Running a Mapping with a Parameter Set
To run a mapping with a parameter set from the command line, you must deploy the mapping as an application and specify the parameter set in the application. Run the deployed mapping and specify the parameter set.
If you need to use different parameter sets, you can deploy more than one parameter set in the application. When you run the mapping, you can specify the parameter set that you want to use.
After the application is deployed, use the infamcd addParameterSetEntries command to add parameter set entries. Use the infacmd updateParameterSetEntries command to update parameter set entries.
For more information about using parameter sets with infacmd, see the Informatica Command Reference.
Running a Mapping with a Parameter File
To run a mapping with a parameter file from the command line, you must deploy the mapping as an application. Run the mapping and specify the parameter file. Use the infacmd ms RunMapping command. The -pf argument specifies the parameter file name.
For example, the following command runs the workflow MyWorkflow using the parameter file "MyParamFile.xml":
infacmd wfs StartWorkflow -dn MyDomain -sn MyDataIntSvs -un MyUser -pd MyPassword -a MyApplication -wf MyWorkflow -pf MyParamFile.xml
For example, the following command runs the mapping MyMapping using the parameter file "MyParamFile.xml":
infacmd ms RunMapping -dn MyDomain -sn MyDataIntSvs -un MyUser -pd MyPassword -a MyApplication -m MyMapping -pf MyParamFile.xml
The Data Integration Service fails the mapping when you run it with a parameter file and the parameter file is not valid. The Data Integration Service fails the mapping if it cannot find the parameter file or it cannot access the parameter file.
For more information about using parameter sets with infacmd, see the Informatica Command Reference.