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.
Answer Posted / 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 |
Post New Answer View All Answers
can u give example for factless fact table
What is expression transformation?
Suppose on 1st Nov 2010 you had created a mapping which includes huge aggregator calculations and it is under process for next two days. You will notice that even on 3rd day also its still calculating. So without changing a logic or changing a mapping How will you troubleshot or to run that mapping? Explain the steps
What is depict expression change?
What is transformation?
How do you set a varible in incremental aggregation
How to display session logs based upon particular dates. If I want to display session logs for 1 week from a particular date how can I do it without using unix. ?
What is primary and backup node?
Explain the mapping variable usage example in informatica
How does the aggregator transformation handle null values?
Design a mapping to load a target table with the following values from the above source?
What do you understand by term role-playing dimension?
How many ways are there to create ports?
What is the meaning of up gradation of repository?
What is standalone command task?