Reconsider the RANK Transformation that fetches the department-wise second highest salary.
Earlier, we have used RANKINDEX = 2 (constant), we’ll modify that to include mapping parameters and variables.
Create mapping M_RANK_PARA.
Before applying the filter, go to Mappings Menu and click on Parameters and Variables…..
Mapping Parameter in Informatica |
Define parameter (constant value which is defined before the mapping is run).
Mapping Parameter in Informatica |
Add a new variable $RANK_SAL .Type (Parameter).
We can also give an initial value here.
The order of execution will be Repository variables (parameters and variables) Initial Value
Mapping Parameter in Informatica |
Now Edit the Filter Transformation and in the Properties Tab click on Filter Condition.
In the Variables tab, select Mapping Parameters $RANKSAL.
Mapping Parameter in Informatica |
Mapping Parameter in Informatica |
In the workflow designer, create a workflow WKF_RANK_PARA.
In mapping the Transformation properties select Number of Ranks = 5.
Mapping Parameter in Informatica |
Open a notepad and type
MEEN_PRACTICAL.WF:WKF_RANK_PARA.ST:s_M_RANK
(folder.workflow.session)
Mapping Parameter in Informatica |
Save the file as rank_para.prm
Edit the Session and in the Properties Tab give the parameter filename as C:\rank_para.prm
Mapping Parameter in Informatica |
To change the parameter value modify .prm file and right click on the session and restart the task.
Mapping Parameter in Informatica |
Mapping Parameter in Informatica |
Comments
Post a Comment