Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



I have source like this year account month amount ----- --------- ------ -------- 1999 salaries j..

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

I have source like this year account month amount ----- --------- ------ -------- 1999 salaries j..

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

I have source like this year account month amount ----- --------- ------ -------- 1999 salaries j..

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

I have source like this year account month amount ----- --------- ------ -------- 1999 salaries j..

Answer / a

select yr,acc, max(decode (mon,'jan',am)) mon1,max(decode
(mon,'feb',am)) mon1,max(decode (mon,'mar',am)) mon1 from
intr
group by yr,acc

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More Informatica Interview Questions

what is the monster dimension plz give me one example

2 Answers   EDS,


what are the limitations of pushdown optimization technique ? Advance thanks

3 Answers   Puma,


how will u load the data to diminision tables and fact tables,what is the hiraraichy why we are using hirarichy

2 Answers   TCS,


Explain the types of lookup transformation?

0 Answers  


Where should yoU place the flat file to import the flat file defintion to the designer?

4 Answers  


Source and Target are flat files, Source table is as below ID,NAME 1,X 1,X 2,Y 2,Y On Target flat file i want the data to be loaded as mentioned below ID,NAME,REPEAT 1,X,2 1,X,2 2,Y,2 2,Y,2 How to achieve this, Can i get a map structure

2 Answers   CTS,


How can we eliminate duplicate rows from flatfile,explain?

3 Answers  


what is data driven?

5 Answers   TCS, Wipro,


for ex: in source 10 records are there with column sal. use a filter transformation condition as Sal=TRUE and connect to target. what will happen.

11 Answers   Accenture,


I have 1 crore record in my table and I have to load 25 L in 1st target,25L in 2nd target and 25L in 3rd target? I am new to Informatica,can anybody suggest me the idea?

2 Answers  


If source is having 5000 rows,and if you want to load data into 500 rows to target,if the session runs successfully,how can you verify the target if the rows are successfully loaded or not.

3 Answers   IBM, TCS,


How to load the data from a flat file into the target where the source flat file name changes daily?

0 Answers   Informatica,


Categories