Combining data of two similar flat files

Get new comments by email
You can cancel email alerts at anytime.
Comments (9)

priya in Hackensack, New Jersey

82 months ago

Can anybody tell me How to join two flat files so that the data from two of the comes to oracle target... all source and target have same format...
Like I have 6 records in File1 and 5 Records in File2
soI want 11 Records in my Target now?

Thanks in advance
Priya

- Was this comment helpful? Yes (1) / No Reply - Report abuse

BILAL in Chicago, Illinois

82 months ago

First of all, the two flat files should reside on the local machine where the Informatica server resides. In the source analyzer, import the two source definitions as flat files. Then, with the help of the flat file Wizard, configure the flat files settings or properties to correspond to the required data types and other configurations.
After you have imported the flat file source definitions, go to the source analyzer and import the oracle target table definition.
Use a joiner transformation to join the two flat files and load them into the oracle target table.
When you create a session to run this mapping, make sure that you specify the correct name and directory where the source flat files are residing.

If you have 6 records in File1 and 5 Records in File2, you may not get 11 records in the target table unless you are performing a full outer join and none of the records of the two flat files match the other one. If you make an equi-join, the maximum number of records you may get is 6 records.

GOOD LUCK,

- Was this comment helpful? Yes (4) / No (9) Reply - Report abuse

Jay in Moline, Illinois

79 months ago

If file1 and File2 have the same layout, you can use a "filelist" comprised of these two file names. This will allow you mapping to read file1 and then file2 and write them to the Oracle table. The filelist will be in a parameter file.

- Was this comment helpful? Yes (10) / No (1) Reply - Report abuse

Deepak in Cincinnati, Ohio

78 months ago

Use a Union transform

- Was this comment helpful? Yes (3) / No Reply - Report abuse

Nandhini in Fords, New Jersey

77 months ago

U can use Indirect flat file system. Create a flat file and give path and filename of the files(which u need to join).

import any one flat file in source analyser. and go to the session / files and directory - change the flat file type as Indirect flat file and give the name of the indirect flatfile. then start running ur session it gives the result which u wanted....

- Was this comment helpful? Yes (6) / No (3) Reply - Report abuse

Tanveer in Newark, New Jersey

65 months ago

Use file parser C# string reader and writer
Tanvtech.com

- Was this comment helpful? Yes / No Reply - Report abuse

sameer in Uncasville, Connecticut

57 months ago

hey...
I have same issue please give some solution....please

Ujjwalm in Sunnyvale, California said: Nandhini, I was able to do the scenario given by you. I have a new requirement on top of this. Each file will have a date tagged to filename. When i load multiple files to target. I want to capture even the date that is tagged to filename for all the records in the file.

Here is an eg:
Flat File names i have in my informatica src directory
FF_07_11_2008.csv
FF_07_12_2008.csv

File format for both flatfiles are same.

Content in FF_07_11_2008.csv
Name Age
User1 26
User2 27

Content in FF_07_12_2008.csv
Name Age
User3 28
User4 30

When i load these. I would need to get this in target.
Name Age Date
User1 26 07_11_2008
User2 27 07_11_2008
User3 28 07_12_2008
User4 30 07_12_2008

Thanks

- Was this comment helpful? Yes (2) / No Reply - Report abuse

paola in New York, New York

42 months ago

por favor necesito saber que es archivo de reporte

- Was this comment helpful? Yes (1) / No Reply - Report abuse

Sridhar Lakshmipathy in Chennai, India

25 months ago

Hi Sameer,
In source definition in properties tab you will have option to select
add currently processed flatfile name port.

If you select this option you will have the port with currently processing filename.From this port you can extract the datepart using expression transformation and populate in your target .

- Was this comment helpful? Yes / No (1) Reply - Report abuse

» Sign in or create an account to comment on this topic.