Saturday, 8 September 2012

Reject File in Informatica

Reject File Parameters
You can create user-defined reject file session parameters. Use a reject file parameter when you want to change the name or location of session reject files between session runs. Name all reject file session parameters with the prefix $BadFile, followed by any alphanumeric and underscore characters. All reject file parameters within a session need to have distinct names. You can create a reject file parameter for any target in a session. When you define the parameter in a parameter file, you can reference any directory local to the PowerCenter Server.
You can use a user-defined reject file session parameter in either the Reject File Directory or Reject Filename session property.  

Changing the Reject File Name
You can use a reject file parameter to change the name of a reject file a session uses. In the Properties settings of the Mapping tab, enter the reject file parameter in the Reject Filename field. Then define the parameter in the parameter file. When the PowerCenter Server runs the session, it locates the directory listed in the Reject File Directory field and creates the reject file listed in the parameter file. If the reject file already exists, it appends rejected data to the existing reject file.
For the reject file name, you create a session parameter named $BadFileName. In the parameter file, you set $BadFileName to “FirstRun.bad.” When you registered the PowerCenter Server, you set $PMBadFileDir for C:/Program Files/Informatica/PowerCenter Server/BadFiles. When the PowerCenter Server runs the session, it creates the FirstRun.bad file in the C:/Program Files/Informatica/PowerCenter Server/BadFiles directory.

Changing the Reject File and Directory
You can use a reject file parameter to change both the directory and name for session reject files. When you specify both the reject file and directory in the Reject Filename field, you need to clear the Reject File Directory field. The PowerCenter Server concatenates both fields to determine where to find the indicated reject file.
For example, you use a database connection parameter to configure a session to write to different target databases. Instead of having the PowerCenter Server append rejected data from all sessions to the same reject file, you want to have a reject file for each target system. In the session, you name the reject file $BadFileName and clear the Reject File Directory field. In the parameter file, you set $BadFileName to the reject filename and directory for the target database used in the session. When you change the database connection parameter to a different database, you can also change the reject filename and directory.
Alternatively, you can create a different parameter file for each target system. You can then use pmcmd to specify which parameter file to use when you start the session.

1 comment:

  1. awesome post presented by you..your writing style is fabulous and keep update with your blogs Informatica Online Course Hyderabad


Related Posts Plugin for WordPress, Blogger...