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
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 |
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 |
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 |
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 |
In SCD type 2 if we had select date range. then suppose we had inserted today's date(eq. date is 30 aug 2010) then start date will be today's date(30 aug 2010) what will be the end date,we cant leave it blank?
Differences between connected and unconnected lookup?
i have a session which creates a file every time when i runs the session, but it replaces the first file with second file,i want to append the second file follwed by first file when i runs the session,how to achieve this?
why we need informatica
i have two sources both is oracle database . one is coming from USA database and another one is coming from U.k database .i am using source qualifier transformation to join this.as that time in session level source properties which path i need to give to retrieve that data. thanks bala 09619894486
why union is active transformation?
What is hash partition?
can we override a native sql query within informatica? How do we do it?
How to delete duplicate records in a flat file source?
Can we schedule a workflow(not a session) to run after completition of another workflow? Can we make a workflow depend on completition of another one?
Did u used latest transformations of 8.6.0? for what?
What is the difference between informatics 7x and 8x and what is latest version?