I HAVE A SOURCE FILE CONTAINING
1|A,1|B,1|C,1|D,2|A,2|B,3|A,3|B
AND IN TARGET I SHOULD GET LIKE
1|A+B+C+D
2|A+B
3|A+B
WHICH TRANSFORMATION I SHOULD USE

Answers were Sorted based on User's Feedback



I HAVE A SOURCE FILE CONTAINING 1|A,1|B,1|C,1|D,2|A,2|B,3|A,3|B AND IN TARGET I SHOULD GET LIKE ..

Answer / nitin

Create two mapping pipelines
One pipeline is to
1) Break the record 1|A,1|B,1|C,1|D,2|A,2|B,3|A,3|B using normalizer transformation
1|A
1|B
1|C
1|D
2|A
2|B
3|A
3|B
Then pass the records into a flat file target.

Source-->SQ-->Normaliser--> Target (Output_file1)
Output_file1-->SQ--> Aggregator-->Target(Output_file2)


Create another mapping pipeline where the above records act as the source and the delimiter as '|'.
Use an aggregator transformation to group based on the first column and use the SUM(col2) GROUP BY col1.
write the output to the target file with | as delimiter

Is This Answer Correct ?    0 Yes 0 No

I HAVE A SOURCE FILE CONTAINING 1|A,1|B,1|C,1|D,2|A,2|B,3|A,3|B AND IN TARGET I SHOULD GET LIKE ..

Answer / nitin

1) Src-->SQ->Normalizer-->Target
The first pipeline breaks the rows and convert to columns and then write to target file.
1|A
1|B
1|C
1|D
2|A
2|B
3|A
3|B

2)Src->SQ->Exp->Target
The second pipeline receives the above output with '|' as delimiter and passes to expression.
In the expression transformation concatenate the second column with + for the same first column and then write to target with | as delimiter

Is This Answer Correct ?    0 Yes 0 No

I HAVE A SOURCE FILE CONTAINING 1|A,1|B,1|C,1|D,2|A,2|B,3|A,3|B AND IN TARGET I SHOULD GET LIKE ..

Answer / ankit kansal

There is only one row as per the defined problem. so first you have to break down this one row into multiple rows as separated by delimiter ','.
1|A
1|B
1|C
1|D
2|A...
Now in Expression Transformation using some string functions and later using rank/aggregator T/S you can achieve your result...

http://deepinopensource.blogspot.in

Is This Answer Correct ?    0 Yes 1 No

I HAVE A SOURCE FILE CONTAINING 1|A,1|B,1|C,1|D,2|A,2|B,3|A,3|B AND IN TARGET I SHOULD GET LIKE ..

Answer / amedela chandra sekhar

By using aggregator t/r we can achieve.
use || function

Is This Answer Correct ?    3 Yes 5 No

I HAVE A SOURCE FILE CONTAINING 1|A,1|B,1|C,1|D,2|A,2|B,3|A,3|B AND IN TARGET I SHOULD GET LIKE ..

Answer / guest

Aggregator with group by on column with values 1, 2, 3

Is This Answer Correct ?    7 Yes 12 No

Post New Answer

More Informatica Interview Questions

what is fact table?

9 Answers  


what are the real time problems generally come up while doing or running mapping or any transformation?

2 Answers  


If I have set the property Treat Source Rows as Insert and for the target properties I have checked the boxes Update as Update, what will happen to incoming rows? What exactly is the use of these check boxes and in which scenarios we use them. Also what is the sequence in which informatica understands these properties.Does it takes whatever is defined in treat source rows as property or it is in any other way. Please explain.

3 Answers   Amdocs,


There are n numbers of flatfile of exactly same format are placed in a folder .Can we load these flatfile's data one by one to a single relational table by a single session??

9 Answers   TCS,


how do u get the first record from 50,000 records ?

10 Answers   TCS, UBS,


hi all, i have 1 flat file having 10 rows. like:- id name amt 100 a 100 200 b 200 100 n 300 400 p 3000 100 a 100 600 x 6000 Now i want to load half of this data into one flat file and remaining in other flat file.like :- flat file 1 id name amt 100 a 100 200 b 200 100 n 300 ---------------------- ---------------------- flat file 2 id name amt 400 p 3000 100 a 100 600 x 6000 Plz reply me ASAP.

10 Answers  


What is an MDDB? What is the difference between MDDBs and RDBMSs?

3 Answers  


Hi, Can someone send me the DWH and Informatica FAQ's at vanibv6@gmail.com Thanks in Advance, Vani

2 Answers   Wipro,


what is Active lock explain

0 Answers   Satyam,


How to join three sources using joiner? Explain though mapping flow.

0 Answers  


What are your source in project and how you import in informatica? How can i explain abt this?

1 Answers   Accenture, Unisoft Infotech,


how to duplicates from expression transformation without using sorter before that

1 Answers  


Categories