Saturday, August 31, 2013

File List / Indirect Load

A file list is nothing but loading multiple source files of same structure using one instance in the mapping. If an organization collects data at several locations which you then want to move through the same session. We need to create a mapping to use multiple source files for one source instance.

To use multiple source files, you create a file containing the names and directories of each source file you want the Integration Service to use. This file is referred to as a file list.

When we configure the session properties, enter the file name of the file list in the Source Filename field, enter the location of the file list in the Source File Directory field and Source filetype as Indirect. When the session starts, the Integration Service reads the file list, then locates and reads the first file source in the list. After the Integration Service reads the first file, it locates and reads the next file in the list.

The Integration Service writes the path and name of the file list to the session log. If the Integration Service encounters an error while accessing a source file, it logs the error in the session log and stops the session.

Note: When you use a file list and the session performs incremental aggregation, the Integration Service performs incremental aggregation across all listed source files.

Creating the File List
The file list contains the names of all the source files you want the Integration Service to use for the source instance in the session. Create the file list in an editor appropriate to the Integration Service platform and save it as a text file. 

Use the following rules and guidelines when you create the file list:
  • Each file in the list must use the user-defined code page configured in the source definition.
  • Each file in the file list must share the same file properties as configured in the source definition or as entered for the source instance in the session property sheet.
  • Enter one file name or one path and file name on a line. If you do not specify a path for a file, the Integration Service assumes the file is in the same directory as the file list.
  • Each path must be local to the Integration Service node.

Example shows a valid file list created for an Integration Service on Windows
C:\Informatica\SourceFileDir\department_list.dat

d:\data\department_10.dat
e:\data\department_20.dat
f:\data\department_30.dat

After you create the file list, place it in a directory local to the Integration Service

Note:
The file list can be created by using Unix Script or Windows Batch script. But if the list are landed in the same drive then we not required to use any script. It can be done you using command type in mapping table under session properties.

Eample: 
abc_111.txt
abc_222.txt
abc_333.txt

in command type: cd directory_name ls -lrt abc*txt > abc_file_list.txt

Configuring a Session to Use a File List

Once you create a file list for multiple source files, you can configure the session to access those files.

1. Open the session properties.
2. Click the Mapping tab and open the Transformations view.
3. Click the Properties settings in the Sources node.
4. In the Source Filetype field, choose 'Indirect'.
5. In the Source Filename field, replace the file name with the name of the file list. 
6.  Click Apply and OK. 

3 comments:

  1. Excellent man!. Keep going

    ReplyDelete
  2. I really appreciate information shared above. It’s of great help. If someone want to learn Online (Virtual) instructor lead live training in Informatica , kindly contact us http://www.maxmunus.com/contact
    MaxMunus Offer World Class Virtual Instructor led training on Informatica. We have industry expert trainer. We provide Training Material and Software Support. MaxMunus has successfully conducted 100000+ trainings in India, USA, UK, Australlia, Switzerland, Qatar, Saudi Arabia, Bangladesh, Bahrain and UAE etc.

    For Free Demo Contact us:
    Name : Arunkumar U
    Email : arun@maxmunus.com
    Skype id: training_maxmunus
    Contact No.-+91-9738507310
    Company Website –http://www.maxmunus.com


    ReplyDelete
  3. Good site you have got here.. It’s difficult to find high quality writing like yours these days.
    I seriously appreciate individuals like you! Take care!!We at Propertyhunters. this is our service web site. please visit our web site.
    Thank you.Properties For Sale in Qatar

    ReplyDelete