Transformation to Load 5 Flat files

What is the method of loading 5 flat files of having same structure to a single target and which transformations will you use?

Questions by sarun5   answers by sarun5

Editorial / Best Answer

sarun5  

  • Member Since Feb-2008 | Mar 13th, 2008


Guys I have got the answer for which I asked..here you go

This can be handled by using the file list in informatica. If we have 5 files in different locations on the server and we need to load in to single target table. In session properties we need to change the file type as Indirect.
(Direct if the source file contains the source data. Choose Indirect if the source file contains a list of files.
When you select Indirect, the PowerCenter Server finds the file list then reads each listed file when it executes the session.)
am taking a notepad and giving following paths and file
names in this notepad and saving this notepad as
emp_source.txt in the directory /ftp_data/webrep/

/ftp_data/webrep/SrcFiles/abc.txt
/ftp_data/webrep/bcd.txt
/ftp_data/webrep/srcfilesforsessions/xyz.txt
/ftp_data/webrep/SrcFiles/uvw.txt
/ftp_data/webrep/pqr.txt

In session properties i give /ftp_data/webrep/ in the
directory path and file name as emp_source.txt and file type as Indirect.

Showing Answers 1 - 33 of 33 Answers

senthil_spy

  • Feb 23rd, 2008
 

wat you have to do is
* create one more file in the same folder where u have those 5 files..and
* specify the path of all those 5 files...now just
*  take the metadata of any one file among those 5..as a source...
* but to give the connection information of the flat file u have to give the location of the 6th file(which contains the path of other 5).


correct me if am wrong...

  Was this answer useful?  Yes

krishrad

  • Feb 25th, 2008
 

slight change in your answer.

U just give the names of those files(5 files) in a single file and give that file name.Also in a session properties change file type to "Indirect".

I think this explanation will clear your doubts.

  Was this answer useful?  Yes

gokulyadav

  • Mar 2nd, 2008
 

Senthil
I have Tried with what you said but it is not loading into the target can you be clear with the attribute values for @ Source File Directory@ Source File Name@ Source File TypeTax.,

  Was this answer useful?  Yes

Guys I have got the answer for which I asked..here you go


This can be handled by using the file list in informatica. If we have 5 files
in different locations on the server and we need to load in to single target
table. In session properties we need to change the file type as Indirect.
(Direct if the source file contains the source data. Choose Indirect if the
source file contains a list of files.
When you select Indirect, the PowerCenter Server finds the file list then reads
each listed file when it executes the session.)
am taking a notepad and giving following paths and file
names in this notepad and saving this notepad as
emp_source.txt in the directory /ftp_data/webrep/


/ftp_data/webrep/SrcFiles/abc.txt
/ftp_data/webrep/bcd.txt
/ftp_data/webrep/srcfilesforsessions/xyz.txt
/ftp_data/webrep/SrcFiles/uvw.txt
/ftp_data/webrep/pqr.txt


In session properties i give /ftp_data/webrep/ in the
directory path and file name as emp_source.txt and file type as Indirect.

roshan239

  • Jul 19th, 2010
 

This very easy to load more than one flat files to target. To do this we can save d full path name in a text file; there after in session properties write the full path name of the folder where we have copied all the full path names of the files and select the file type as INDIRECT. This is mechanism to load flat file from more than one flat file..

Hope you got your answer. 

  Was this answer useful?  Yes

Ashok Gulagond

  • Dec 16th, 2016
 

When we have the same structured flat files, why don't simply use UNION make them a single file and then load to target instead of such complication? or UNION doesn't work on flat files?

  Was this answer useful?  Yes

Anurag

  • Nov 27th, 2017
 

You should use a indirect file (which contain path and name of all the 5 files) as source. Transformation depends on the business logic.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions