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...


hi all hi have flat file like below my requirement is
empid,ename,sal,loc
101,vamshi,5000,hyd
101,vamshi,5020,hyd
201,raju,5000,hyd
202,ram,4000,hyd
203,kumar,3500,pune
203,kumar,3500,pune
203,kumar,5000,hyd
203,kumar,6000,hyd
i want the o/p like this
in one target
201,raju,5000,hyd
202,ram,4000,hyd
and in second target
101,vamshi,5000,hyd
101,vamshi,5020,hyd
203,kumar,3500,pune
203,kumar,3500,pune
203,kumar,5000,hyd
203,kumar,6000,hyd

Answers were Sorted based on User's Feedback



hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / dj

please give the clear picture of this logic

Is This Answer Correct ?    0 Yes 0 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / kamleshmishra291

After SQ Take Aggr group by empid and create a variable port Rows_count=count(1)
Take a router after aggr and create two groups one for uniqe and one for duplicate
in uniqe condition = Rows_count=1
duplicate group condition= Rows_count>1
connect unique group to tgt1
connect duplicate group to java transformation---
add following codes
for (int i=0;i<count;i++)
{
o_empid=i_empid;
o_ename=i_ename;
o_loc=i_loc;
o_sal=i_sal;
generateRow();
}

connect java transformation to tgt2

Is This Answer Correct ?    0 Yes 0 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / isha

Actually this question is - If any record have duplicate value then put it in T1 and If count is 1 then put in T2.

We have to use aggregator and have to group records based on empid and name

If count(empid) > 1 then T2
If count(empid) =1 then T1

Is This Answer Correct ?    0 Yes 0 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / abhishek guddu

src->sq->aggregator->router->target1
|->target2
AggregatorT/F

EMPID -> (GROUP BY)
O_COUNTID(EMPID)-OUTPUT PORT
<- COUNT(EMPID)> 1
ROUTER T/F
GROUP
ONE - CONDITION-> 0_COUNTID ->TARGET1(SECOND TARGET)
DEFAULT->TARGET2(TWO TARGET)

ONE GROUP RETURN DUPLICATE EMPID AND DEFAULT WILL UNIQUE.

Is This Answer Correct ?    6 Yes 7 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / sivakumar

SQ-->EXP-->ROUTER-->TRg
EMPID
IN_EMPID
in exp t/r
create variable port v_flag in that write the following condition
IIF(EMPID = IN_EMPID ,'1','0')

in router develop 2 conditions for v_flag
the values in the true will b directed to one output which we get the duplicated values

Is This Answer Correct ?    0 Yes 1 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / chiky

sq-->router--target1
|__target2

in router create one group and another default
coundition : decode(empid,201,true,decode
(empid,202,true,false))

connect group one in target table one
connect default in target table two

Is This Answer Correct ?    1 Yes 2 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / redflower

src->sq->exp->router->trg1
->trg2

create one variable port and write the substr() function
ename like k% is goes to one trg and remaining records goes
to another trg by using router t/r

Is This Answer Correct ?    2 Yes 4 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / ramesh

target1
SQ->Router->
target2

1.In router create one group and specity
the condition empid=201 or empid=202.
2.It is connected to target1.
3.Default group is connected to target2.

Thanks & Regards
Ramesh

Is This Answer Correct ?    2 Yes 5 No

hi all hi have flat file like below my requirement is empid,ename,sal,loc 101,vamshi,5000,hyd 10..

Answer / krish

using AGG we get can't get the above o/p

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More Informatica Interview Questions

A Main workflow "wkf_Main" has multiple sessions (S1, S2...., can I make changes and promte one session (S5) at any time or have to promote whole Workflow "wkf_Main" every time?

4 Answers  


What is partioning?how many types of partinings are there

2 Answers   HCL,


I am Unable to load the FixedWith FlatFile Into The Target.What Is The Reason. PLZ Help Me..

1 Answers  


Update strategy transformation is an active transformation.How it changes the number of records that pass through it? Please explain....

2 Answers  


In which circumstances that informatica server creates Reject files?

2 Answers  


What is limitations of truncate and load option

1 Answers   Cap Gemini,


What are the methods for creating reusable transforamtions?

2 Answers  


What does command task mean?

0 Answers  


How do we eliminate duplicate records in a flat file without using Sorter and Aggregator?

7 Answers   iNautix,


There are 4 flat files with number of records as indicated below. Which files should be picked first for joining using joiners so as to get best performance. File A - 1000 records File B - 100 records File c - 10000 records File D - 10 records Please explain. Thanks and Regards,

1 Answers   Amdocs,


I have a file with data comming as 1,x1,x2,x3 2,a1,a2 3,b1,b2,b3,b4 1,y1,y2,y3 2,c1,c2,c3 3,d1,d2 my out put should be as follows x1,x2,x3,a1,a2,<null>,b1,b2,b3,b4 y1,y2,y3,c1,c2,c3,d1,d2,<null> Please let me know how can we acheive this in informatica Thanks in advance

4 Answers  


create a mapping to retrieve the employees who are getting salary greater than average salary?

4 Answers   TCS,


Categories