I have source like this
year account month amount
----- --------- ------ --------
1999 salaries jan 9600
1999 salaries feb 2000
1999 salaries mar 2500
2001 benfits jan 3000
2001 benfits feb 3500
2001 benfits mar 4000
-->i need target like this
year account month1 month2 month3
----- --------- -------- -------- --------
1999 salaries 9600 2000 2500
2001 benfits 3000 3500 4000
Answers were Sorted based on User's Feedback
Answer / soumen
Use following method --
sq_source --> exp_tans --> agg_trans --> target
exp_trans --> add 3 variable --
v_month1 == iif(month='jan', amount, 0)
v_month2 == iif(month='feb', amount, 0)
v_month3 == iif(month='mar', amount, 0)
agg_trans --> add 5 cols from exp_trans --
year(check group by), account(check group by), v_month1,
v_month2, v_month2
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / soumen
Little corrections ---->
Use following method --
sq_source --> exp_tans --> agg_trans --> target
exp_trans --> add 3 variable --
v_month1 == iif(month='jan', amount, 0)
v_month2 == iif(month='feb', amount, 0)
v_month3 == iif(month='mar', amount, 0)
agg_trans --> add 5 cols from exp_trans --
year(check group by), account(check group by), sum(v_month1),
sum(v_month2), sum(v_month2)
Now forward these 5 cols to Target.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / sai karthik
We can achieve this with Aggregator transformation.
SQ-->AGG-->TGT
IN AGGREGATOR TRANSFORMATION GROUP BY YEAR AND ACCOUNT PORTS
AND TAKE THREE OUTPUT PORTS 1. MONTH1, 2. MONTH2, 3. MONTH3 AND WRITE THESE FUNCTIONS.
1. MAX(DECODE(MONTH,'JAN',AMOUNT))
2. MAX(DECODE(MONTH,'FEB',AMOUNT))
3. MAX(DECODE(MONTH,'MAR',AMOUNT))
CONNECT THE PORTS TO THE TARGET AND RUN THE SESSION AND SEE THE RESULT.
CHEERS
SAI KARTHIK
| Is This Answer Correct ? | 1 Yes | 0 No |
how to connect two or more table with single source qualifier?
with out using update strategy transnsformation how to update the data in mapping level
What is the difference between the system variables $$$SessStartTime and SESSSTARTTIME?
Clarify the utilization of aggregator cache record?
how DTM buffer size and buffer block size are related
Do you find any difficulty while working with flat files as source and target?
source target Q410 4 2010 Q311 3 2011 Q412 4 2012 Q309 3 2009
If one flat file contains n number of records., we have to load the records in target from 51 to 100.. how to use expressions in Informatica..?
Give one example for each of conditional aggregation, non-aggregate expression, and nested aggregation?
What is the difference between a connected look up and unconnected lookup?
can anybody send me some real time screenshots of mapping in informatica powercenter. i will be vary thankful to him. my e-mail id :- prakashkumar.kumhar@gmail.com
What are the different types of repositories created using informatica?