Documente Academic
Documente Profesional
Documente Cultură
Purpose
A mapping can utilize parameters and variables to store information during the execution. Each parameter and variable is defined with a specific data type and their main purpose is to provide increased development flexibility. Parameters are different from variables in the fact that:
The value of a parameter is fixed during the run of the mapping Variables can change in value during run-time Both parameters and variables can be accessed from any component in the mapping which supports it. To create a parameter or variable, go to Mapping -> Parameters and Variables from within the Mapping Designer in the Designer client. The format is $$VariableName or $$ParameterName
SETVARIABLE sets the variable to a value that you specify (executes only if a row is marked as insert or update). At the end of a successful session, the Integration Service saves either the MAX or MIN of (start value.final value) to the repository, depending on the aggregate type of the variable. Unless overridden, it uses the saved value as the start value of the variable for the next session run. SETCOUNTVARIABLE - increments a counter variable. If the Row Type is Insert increment +1, if Row Type is Delete increment -1. A value = 0 is used for Update and Reject. SETMAXVARIABLE - compare current value to value passed into the function. Returns the higher value and sets the current value to the higher value. SETMINVARIABLE - compare current value to the value passed into the function. Returns the lower value and sets the current value to the lower value.
At the end of a successful session, the values of variables are saved to the repository. The SetVariable function writes the final value of a variable to the repository based on the Aggregation Type selected when the variable was defined.
Parameter files
Parameter file is an ASCII file which is used to set values of mapping paramteres and variables. Parameters can be set on workflow, worklet or session level. The physical location
of a parameter file is set in Workflow manager in Workflows -> Edit. It can also be specified using the pmcmd command when starting a session task.
$$DBC_ORA=oracle_sap_staging
Get the latest updates on Informatica Way directly in your inbox. Subscribe now Parameter file is a text file that contains parameters and variables which can be referenced in Sessions and Workflows. Multiple Session and Workflows can share the same parameter file by logically grouping the Parameter file as mentioned below. Each section is preceded by a heading that identifies the Integration Service, Integration Service process, Workflow, Worklet or session to which the parameters or variables need to be defined. Parameters and variables need to be defined below the heading. Characteristics:
The Integration Service interprets all characters between the beginning of the line and the first equals sign
as the parameter name and all characters between the first equals sign and the end of the line as the parameter value. Parameter File Sections: The following table describes the parameter file headings that define each section in the parameter file and the scope of the parameters and variables that you define in each section. We can define the parameters in the file as shown below:
Heading
Example
Scope
[Global]
$PMSuccessEmailUser=pcadmin@mail.co m $PMFailureEmailUser=pcadmin@mail.co m
All Integration Services, Integration Service processes, workflows, worklets, and sessions. The named Integration Service and workflows, worklets, and sessions that this service runs.
[Service:service name]
The named Integration Service process and workflows, worklets, and sessions that this service process runs.
The nested worklet and all sessions within the nested worklet.
m $PMFailureEmailUser=pcadmin@mail.co m Or
Precedence: Create each heading only once in the parameter file. If there are multiple headers with the same name, Integration service will always refer to the first one and ignore the rest. For example, a parameter file contains the following identical headings:[HET_TGTS.WF:wf_TCOMMIT1] $$platform=windows
[HET_TGTS.WF:wf_TCOMMIT1] $$platform=unix $DBConnection_ora=Ora2 In workflow wf_TCOMMIT1, the value for mapping parameter $$platform will be windows and not unix. Also, session parameter $DBConnection_ora is not defined. If we define the same parameter or variable in multiple sections in the parameter file, the parameter or variable with the smallest scope takes precedence over parameters or variables with larger scope. For example, a parameter file contains the following sections:[HET_TGTS.WF:wf_TGTS_ASC_ORDR] $DBConnection_ora=Ora2[HET_TGTS.WF:wf_TGTS_ASC_ORDR.ST:s_TGTS_ASC_ORDR] $DBConnection_ora=Ora3 In session s_TGTS_ASC_ORDR, the value for session parameter $DBConnection_ora is Ora3. In all other sessions in the workflow, it is Ora2. Comments: Comments can be defined on parameter files. The Integration Service ignores lines that are not valid headings and do not contain an equals sign character (=). The following lines are examples of parameter file comments: Created 10/11/06 by Smith. *** Update the parameters below this line when you run this workflow on Integration Service Int_01. *** ; This is a valid comment because this line contains no equals sign.