Parameterizing the Flat File Names – Informatica

  • Updated
  • Posted in Programming
  • 2 mins read


Q) How to load the knowledge from a flat file into the goal the place the supply flat file title adjustments every day?

Example: I need to load the prospects knowledge into the goal file each day. The supply file title is in the format customers_yyyymmdd.dat. How to load the knowledge the place the filename varies every day?

The answer to this sort of issues is utilizing the parameters. You can specify session parameters for each the supply and goal flat recordsdata. Then create a parameter file and assign the flat file names to the parameters.

Specifying Parameters for File Names:

The steps concerned in parameterizing the file names are:

  • Creating the Parameter File
  • Specifying the parameters in Session
  • Specifying the parameter file title

Creating Parameter File:

Assume two session parameters $InputFileName and $OutputFileName for specifying the supply and goal flat file names respectively. Now create a parameter file in the under format

> cat dynamic_file_names.param
[FolderName.SessionName]

$InputFileName=customers_20120101.dat

$outputFileName=customers_file.dat

Specifying Parameters in Session:

Now it’s important to specify the parameters in the session. Edit the session and go to the Mapping tab. In the mapping tab, choose the supply qualifier in the Sources folder and set the file property “Source FileName” as $InputFileName. Similarly, for goal file set the “Source FileName” as $OutputFileName.

Specifying Parameter File Name:

The final step is specifying the parameter file title. You can specify the parameter file title both in the session stage or workflow stage. To specify in the session stage, go the properties tab of the session and set the property “Parameter FileName”.

To specify the parameter file at workflow stage, click on on the “Worfklows” in toolbar after which on Edit. Now go to the properties and set the file property “Parameter FileName”

Thats it you might be accomplished with utilizing the parameters as filenames. Now it’s important to maintain altering the file title in the parameter file every day.

Note: You may even specify the supply and goal directories as parameters.

Leave a Reply