Thursday, October 25, 2012

Informatica $$Parameters in Param file and their scopes



Important Points:
The parameters are detected by the Informatica IS with a $$ and takes the parameter name from the $$ till the occurrence of the ‘=’ symbol, anything between $$ and = shall be considered as the parameter name.
Similarly any value from the ‘=’ till the end of the line shall be considered as the value to the respective parameter.
The parameter files are saved with an extension .prm
There are different levels of precedence of the parameters,

The mapping level precedence
This is the least precedence level, defined as initial value in the mapping designer itself.

The Global precedence:
These are the parameters defined in the whole workflow’s parameter files, directly as parameters.
Example:
[gloabal]
$$Param_test=2011

The Session level precedence:
The session level parameters are defined in the workflow’s parameter file with the session name, this has the precedence over the global parameters.
Example:
$$Param_test=2011
[s_sample_session_name]
$$Param_test=2012
So here in the session ‘s_sample_session_name’, the ‘’$$Param_test” holds the value 2012 and not the 2011 for the higher precedence by the session level parameter.

The Session Param file precedence:
There can also be a separate parameter file that can be defined for a session, where the parameter value defined in this param file takes the higher precedence than the one defined in the workflow’s param file.

The Path defined parameter precedence:
There can be situations where a reusable session used in two different worklets can need two different param values at two instances. This can be very well achieved by indicating the specific session name through its worklet as in the below example.

Example:
If s_session_test1 is used in WKLT_workletA and WKLT_workletB with two different values, then we can define the parameter value as,
[FLD_folder_name.WF:wf_workflow_name.WT:WKLT_workletA.S:s_session_test1]
$$Param_name=2011
[FLD_folder_name.WF:wf_workflow_name.WT:WKLT_workletB.S:s_session_test1]
$$Param_name=2012

So the same session uses the same parameter, but with different values at different worklets.


No comments:

Post a Comment