Sunday, October 25, 2015

Add Currently Processed Flat File Name Port

CurrentlyProcessedFileName:
CurrentlyProcessedFileName is currently added in Informatica PowerCenter 9 which is used with File List/Indirect Method. This is used to identified the currently data processing file name from the file list. This will add a new non-editable column to source definition to hold processing file name to each and every rows which process through source to target.

This is port is used to identified the file name in case any record/columns failed due to bad/incorrect data in the record for the list of file name from the file list.

Sample Mapping: The below example show you the bad/rejected record from which file.

Note:  You can also validate the data based on the requirement and capture the file name. 

1. Import/Create the source definition into Source Analyzer. 


2.  Edit and Go to the  Properties Tab: Select the Check Box (add Currently Processed Flat File Name)



3. Drag/Add Source & Target instance to Mapping.

4. Add expression transformation to capture the currently processing file name only (to skip the file folder path).

Add one variable port to capture the file name.

Here is the syntax:

5. Map the required columns/ports to the target instance

6. Create a workflow

7. Create the session for the above mapping.
Select Source Filetype as Indirect
Source File Directory: FileList (which is having the file path and file names which we are trying to load using this mapping)

 sample file list:

Source 1: Employees list for dept no 10

Source 2: Employees list for dept no 20

Source 3: Employees list for dept no 30

Target File: This target file having the source file name for each row coming from where its coming.

Note: You can see here EmpID 7698 from deptno 30 is not in target file.

Session Log File:

Here you can see the file name for the rejected record


5 comments:

  1. Thanks :) It was really of great help
    -shreeparna

    ReplyDelete
  2. It was really a nice article and i was really impressed by reading this Informatica Online Training India

    ReplyDelete
  3. Hi ,
    Can someone please help me know the difference between

    "Add Currently Processed Flat File Name Port" at SOURCE level and
    "Add file name column to this table" at TARGET level?

    Thanks in Advance,
    Rahaman Shaik

    ReplyDelete
    Replies
    1. "Add Currently Processed Flat File Name Port" at SOURCE level is used to capture the filename
      and "Add file name column to this table" at TARGET level is used to generate the output file name dynamically.

      Mainly when we are dealing with multiple files in source level & in indirect method also ,we are using this option.

      And if our Target is a file and we wants to generate new files after every run ,then we are using this option.
      NOTE: Both are non-editable ports.

      Delete