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

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

5 Answers   Informatica,


What is ThroughPut in Informatica, How it works, Where I can find this option to check ?

5 Answers   CTS,


what is the purpose of surrogate key and diff between primary key&surrogate key

1 Answers   Cap Gemini,


IF Sorce table contains CLOB as its one data type then i get error at the target table. How can this be resolve?

2 Answers  


How to do unit testing in informatica? How to load data in informatica ?

0 Answers  






write sql query following table amount year quarter 1000 2003 first 2000 2003 second 3000 2003 third 4000 2003 fourth 5000 2004 first 6000 2004 second 7000 2004 third 8000 2004 fourth i want the output year q1_amount q2_amount q3_amount q4_amount 2003 1000 2000 3000 4000 2004 5000 6000 7000 8000

1 Answers   HP,


r u done any partitions in ur project?

0 Answers   TCS,


Give one example for each of conditional aggregation, non-aggregate expression, and nested aggregation?

0 Answers  


how can u tune u r informatica mapppings

2 Answers   CTS,


Hi I'm new in Informatica. Can you show me a mapping sample on how to piviot the records? Thanks Robin

1 Answers  


Can any one give me a real time example for FACT TABLE & DIMENSIONAL TABLE?

0 Answers  


How to delete the data in the target table after loaded.

3 Answers   TCS,


Categories