Thursday 3 July 2014

How to load 3 files from different location having similar definition into single target.

Approach 1 using File List
Here creating simple pass through mapping
At session level we will be using Source File Type as Indirect (We Can also call it as File Listing)
 
To use file list you need do modification at Session Properties under Mapping tab as below:
Source filetype: Indirect
Source file directory: File path name which is having file list

Source file name: file name which is having source file list
 
Note this is dynamic process approach in future if you getting any new file just we need to add entry in file list, no need of mapping/session/workflow level modifications.


Approach 2 using union transformation.
 Here we will import all the 3 source instance in a mapping, in union we will create 3 groups one for each source instance and will map ports from Union transformation to Target instance.
 In Union Transformation create 3 input groups, one for each input file.
Map ports from 3 Source Instance to 3 group in Union Transformation 
Map ports from Output Group of Union transformation to Target instance

 Approach 3 will required single mapping with 3 different session using Append if file exists option.
For this we required only one common mapping
But at workflow level we will be creating 3 different sessions, where 1st session will create the target file and 2nd & 3rd session will just append the data to the exists file which is created by 1st session.
In 1st session properties mapping tab: Target Properties, Append if Exists is unchecked because it will create new target file. 
In 2nd session properties mapping tab: Target Properties, Append if Exists is checked, because it will append the data to the exists file new target file. 
In 3rd session properties mapping tab: Target Properties, Append if Exists is checked, because it will append the data to the exists file new target file.
 
Note: This is worst approach used in case the input file landing time is different and if you get any new file you need to add one or more sessions are 2nd & 3rd sessions did using append if Exists option checked.

5 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi, your description regarding loading 3 files from different location is very useful for us. You explained well clearly with the screenshots.
    Informatica Training in Chennai

    ReplyDelete
  3. Hi, can we implement the 3rd approach if target is relational table?

    ReplyDelete