an informatica dynamic parameter file can be created dynamically and changes before every batch job execution (every workflow run) .Its dynamic nature provides flexibility. In informatica dynamic parameter file we can add/remove parameters as well parameter values in it automatically by a mapping. Dynamic parameter file capability supports changing needs of project data load.
Where do we need informatica dynamic parameter file [Scenarios] ?
Certainly, a dynamic parameter file has enormous usage. Here is a run down of few of the usage I have seen, though sample scenario discussed below can be achieved by other methods also.
1. To get Batch / workflow load parameters: Let’s say one of your mappings has parameters defined in it, Those parameter value changes very often because they provide flexibility For data processing. In this case you need to build a capability which can provide dynamic parameters before every load.
Parameter which control number of records, to be processed by mapping. Example: for this month I want one mapping to processes only 100,000 records per run.
Parameter which controls the financial year, and force mapping to process any specific year transaction. Example: Today I want to process only year 2009 data.
Parameter which tags records, on certain condition. Example: Records falling before 1 Jan should be marked as “Cleared Delayed processing”.
2. To publish Source file metadata: Let’s say your client need source file metadata in email after each file processed. Here real challenge is to place file metadata in some parameter file that it can be captured in informatica e-mail task.
Number of records mentioned in file header Example: Source file header has record count given in it.
Number of records actually present in file Example: You have calculated number of records present in source file.
Geographic region for which current file contains the data. Example: Let’s say your file come with information like which state or country.
Number of records present in data base for same geographic region Example: database record count for that region.
Source system’s file creation date: Example: Let’s assume your file come file creation date.
4 Simple steps to create informatica dynamic parameter file
Now it’s a small attempt to provide more information to understand how to create dynamic parameter file. We can easily create it with few strings, concatenation operator and by variable port by using expression transformation. Though, major value here will be concatenation operator. This operator will be used to format dynamic parameter file as per our needs.
Step 1 : Identify “Parameter name” and hard code it as string
Ultimately you have to write a flat file at each load, It means at each load you have to write the parameter name afresh in parameter file.
Step 2 : Identify "Parameter Value" and assign it to any variable port
Put all those values (Data) which is dynamic in nature in variables port of
expression. These variables can later be concatenated to form a parameter file line
element. it’s advisable to give name of variable in such a way that it gives a better
readability and moreover help us to assign values.
Step 3 : Concatenate “Parameter Name ” and “Parameter value ” in
Use concatenation operator now to combine both of the values pulled in step 1 and step 2.
Example: Parameter name || parameter value
Step 3 : Write "Parameter Name" and "Parameter Value " to flat file target
Now link these ports to flat file port.