Suppose we have a (assume relational) source table

Product_Id Month Sales
1 Jan x
1 Feb x
. . .
. . .
1 Dec x
2 Jan x
2 Feb x
. . .
. . .
2 Dec x
3 Jan x
3 Feb x
. . .
. . .
3 Dec x
. . .
. . .

and so on. Assume that there could be any number
of product keys and for each product key the sales
figures (denoted by 'x' are stored for each of the
12 months from Jan to Dec). So we want the result
in the target table in the following form.

Product_id Jan Feb March.. Dec
1 x x x x
2 x x x x
3 x x x x
.
.

So how will you design the ETL mapping for this case ,
explain in temrs of transformations.

Answers were Sorted based on User's Feedback



Suppose we have a (assume relational) source table Product_Id Month Sales 1 Jan x ..

Answer / pallavi

we could do it using Normalizer.

Is This Answer Correct ?    10 Yes 5 No

Suppose we have a (assume relational) source table Product_Id Month Sales 1 Jan x ..

Answer / girish

Use an aggregator tx. Pass the ports (Product_id, Month,
Sales) to aggregator, group by Product_ID, manually create
12 ports for month like Jan, Feb, Mar, etc. Include an
expression for 12 ports, individually, as Jan -> IIF(Month
= Jan,Sales), Feb -> IIF(Month = Feb, Sales), etc.

Move these ports to the next transformation or to the
target. This should give the required output.

Is This Answer Correct ?    2 Yes 0 No

Suppose we have a (assume relational) source table Product_Id Month Sales 1 Jan x ..

Answer / mukesh

Use an aggregator. Pass the ports (Product_id, Month,
Sales) to aggregator, group by Product_ID, manually create
12 ports for month like Jan, Feb, Mar, etc. Include an
expression for 12 ports,
Jan -> MAX(IIF(Month
= Jan,Sales)), Feb -> MAX(IIF(Month = Feb, Sales)), etc.

Without max, it will take last row..

Move these ports to the next transformation or to the
target. This should give the required output.

Is This Answer Correct ?    1 Yes 1 No

Suppose we have a (assume relational) source table Product_Id Month Sales 1 Jan x ..

Answer / seekax

The reverse operation can be done using normalizer . . . To
carry out this process above mentioned we need to use
spliter in combination with joiner . . .


---- split using month -------- (into 12 sets of 2-columns)
1st SET 2nd SET
------- --------- . . . . .
product id,jan product id,jan
1,x 1,x
2,x 2,x
3,x 3,x
4,x 4,x . . . . . . .


---- join using product_id --------

Product_id Jan Feb March.. Dec
1 x x x x
2 x x x x
3 x x x x

Is This Answer Correct ?    0 Yes 3 No

Suppose we have a (assume relational) source table Product_Id Month Sales 1 Jan x ..

Answer / janet

Simple SQL logic in the source qualifier sql will take care
of this issue.

Select product_id, month, sum(sales)
from source_table
group by product_id, month;

Then you can just pass the values straight through. No
need to split, aggregate, and join, etc.

Is This Answer Correct ?    4 Yes 8 No

Post New Answer

More Informatica Interview Questions

HOW TO PROCESS THE ROWS FROM JOINER AND EXPRESSION TRANSFORAMTION TO SORTER TRANSFORMATION

0 Answers  


How to identify bottlenecks in sources,targets,mappings,workflow,system and how to increase the performance?

4 Answers  


can you use flat file for lookup table?why?

2 Answers   HCL,


What is the difference between sequential batch and concurrent batch and which is recommended and why?

1 Answers  


wht is cdc?how to use it in creation of mappings?

6 Answers   HSBC,






What is the difference between view and materialised view?

4 Answers  


wf dont have integration severances how you can run?

0 Answers   TCS,


(Integ) Start workflow: ERROR: User [practice] does not have sufficient privilege for this operation. how to solve this pls suggest me? THANKS in advance

1 Answers  


How to find from a source which has 10,000 records, find the average between 500th to 600th record?

3 Answers  


my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and so on but myrequirement is like this id name sal up_sal,1 aa 1000 null,2 bb 2000 1000, 3 cc 3000 2000 4 dd 4000 3000, 5 ee 5000 4000 , 6 ff 6000 50000 and so on so how can i get it plez reply for this as soon as possible , thanks in advanced

9 Answers  


what is the significance of newlookup port in dynamic look up

1 Answers   IBM,


How to handle changing source file counts in a mapping?

3 Answers   Deloitte, TCS,


Categories