Example: When we want to extract records of a particular month during ETL process, we will create a Mapping Parameter of data type and use it in query to compare it with the timestamp field in SQL override. After we create a parameter, it appears in the Expression Editor. We can then use the parameter in any expression in the mapplet or mapping. We can also use parameters in a source qualifier filter, user-defined join, or extract override, and in the Expression Editor of reusable transformations.
Creating Mapping. Open folder where we want to create the mapping. Click Tools - Mapping Designer. Click Mapping- Create- Give name.
Ex: mmpmvexample. Drag EMP and target table.
Transformation - Create - Select Expression for list - Create – Done. Drag EMPNO, ENAME, HIREDATE, SAL, COMM and DEPTNO to Expression. Create Parameter $$Bonus and Give initial value as 200. Create variable $$varmax of MAX aggregation type and initial value 1500.
Create variable $$varmin of MIN aggregation type and initial value 1500. Create variable $$varcount of COUNT aggregation type and initial value 0. COUNT is visible when datatype is INT or SMALLINT. Create variable $$varset of MAX aggregation type.
A parameter file contains the following types of parameters and variables:. Workflow variable: References values and records information in a workflow.
Worklet variable: References values and records information in a worklet. Use predefined worklet variables in a parent workflow, but we cannot use workflow variables from the parent workflow in a worklet. Session parameter: Defines a value that can change from session to session, such as a database connection or file name. Mapping parameter and Mapping variable.
Hi,Please go thru the below link.we define a workflow parameter file and a session parameter file for asession within the workflow, the Integration Service uses the workflowparameter file, and ignores the session parameter file. What if we want toread some parameters from Parameter file at Workflow level and some definedat Session Level parameter file.Define Workflow Parameter file. Say infashared/BWParam/paramglobal.txtDefine Workflow Variable and assign its value in paramglobal.txt with thesession level param file name. Say$$varparamfile=/infashared/BWParam/paramruntime.txtIn the session properties for the session, set the parameter file name tothis workflow variable.Add $PMMergeSessParamFile=TRUE in the Workflow level Parameter file.The $PMMergeSessParamFile property causes the Integration Service to readboth the session and workflow parameter files.